Because you are still having pain, your doctor will probably do more tests to get a better idea where the pain is coming from. Afterward, an injection could be suggested. But relief from an injection is usually only temporary.
Your results from the injection can give the doctor more information about what is going on. If the shot makes you feel better, the piriformis is the source of pain. But this doesn't answer the question of why you have pain. The results will guide your doctor about what to do next.