For most nationalities, you have to have taken yellow fever vaccines to enter South Africa and have an international yellow fever card. Although the health control at the airport is not strict. Even so, they are highly recommended.
For malaria, I don't know of any shots you can take, just pills like Mihir Ranadive just mentioned. The pills are not soft on your stomach though. A lot of doctors just recommend using a very strong insect repellent, specially in the evening (there is a very popular one you can buy in South Africa called Tabard, it's very effective). about 6 years ago
Botswana and South Africa are NOT in Yellow Fever transmission areas. However if you have been to a country which is at risk, you'll need a Yellow Fever vaccination and a card to prove you have had it before you're allowed to enter.
Malaria exists in South Africa's remote north and east (including Kruger national park) especially in a 90 kilometer strip along the border with Zimbabwe and Mozambique. But the risk is regarded as low and seasonal (wet season November to March)
In Botswana Malaria exists everywhere but is especially bad in the north and of course in the wet season.
No anti-malaria shots are available, it's pills, and some people experience bad side effects from them (hallucinations and insomnia). You need to discuss this with your doctor, but many experienced travellers believe because the treatment for Malaria is the same as the preventative, they wait to see if they're infected before taking the medication. That's a personal choice.
Its always best to do your best to avoid being bitten in the first place (protects you against a heap of other mosquito-borne nastiness). So cover up with long-sleeved, long-legged, light-coloured, loose-fitting clothing and slather yourself in insect repellant. Sleep in a sealed air-conditioned room or under bed nets.
Phil from the safety hub about 6 years ago