weekly shot to stop premature labor

Bobbie sue
At the doctor today they mentioned a shot that you have to take weekly to keep from going into early labor has anyone taken this or know anymore about it? My son was born at 34 weeks. What's the opinions on this ?