it's only really ever painful if your gluteal muscles are contracted when the needle goes in, which is why they typically have you leaning/laying on your stomach with your leg in a relaxed position while administering the shots. so don't be that novice bottom and clench up when it goes in and you'll be fine.
something that everyone receiving the syphilis treatment should be aware of is that, depending on a variety of individual factors, you may be susceptible/sensitive to a condition known as the jarisch–herxheimer reaction. the only reason i know about this is because it happened to me shortly after receiving the first shot following my first diagnosis of syphilis. my symptoms started about half an hour after the first injection of penicillin and were: increased heart rate (in excess of 120bpm), sweating, increased body temperature ~102F-103F, nausea, insomnia/restlessness. they were most intense following the injection, fading slowly over the course of about 48 hours. feel free to look up the medical definition but the tl;dr is that the method of action of antibiotics is that they cause the cell walls of bacteria to rupture, and if you have a considerable amount of disease causing bacteria in your blood stream (i think my RPR titer was 1:16 at testing) the rupture en-mass of those bacteria causes the toxic shit inside of the bacteria to be released directly into your blood stream and you have something akin to a toxic shock. your kidneys slowly remove the crap in your blood, so it's always a good idea to drink large amounts of water to help flush it out. just something to be aware of, if you are someone who's in-tune with what's going on with your body so that you don't freak out like i did.