I haven't had personal experience with this, I am pregnant now. BUT, my sister-in-law went into preterm labor at 25 weeks and they gave her the shots (which she said hurt...sorry, just wanted to inform you) in case they couldn't stop the labor. They gave her other medication that stopped her contractions and he was on bedrest after that for 10 weeks and 3 days after she got off bedrest she delivered my niece at 35 weeks. Hopefully, someone with personal experience can help.
the steroids are to strenghten the baby's lungs just in case they cant stop your contractions which I am sure they will be able to. I almost went into preterm labor and was put on bedrest and I was told by the doctor if my cervix was short then they would give me and rx for steroids to strengthen the baby's lungs.