If a woman takes HIV medicines during pregnancy and childbirth and her baby receives HIV medicines for 4 to 6 weeks after birth, the risk of transmitting HIV can be lowered to 2% or less. Most HIV medicines are safe to use during pregnancy, and don't increase the risk of birth defects.
In general, the infected mother should simply stay healthy and intake HIV medicines while she is pregnant.