You could try a hot bath, warm Compresses, have someone rub it for you (if it's not to tender to touch). See if a TENS Unit would work for you as well. If it's behind your right rib, you also could be experiencing a problem with your gallbladder. That's how mine started and finally, after a couple of years and ending up in the hospital three times (6 days, 8 days and 6 days) they finally removed it and that pain was gone. I hope this is helpful. I am sure there are many others here who can offer you more suggestion. Best of luck to you!!
If it truly is from your scoliosis, I recommend one trip to a physical therapist to identify the nerves you need to block the signals to your brain. That is how it works. The T.E.N.S unit sends signals to replace the pain signals which significantly reduces your pain. If people have great results from this, they consider having a permanent device installed in them. I also like to use Biofreeze. It lessens some pain. It has helped me a lot but sounds like you need more help.
If your pain involves nerves from the condition, Gabapentin can reduce the pain from nerves in the back.
Pain medicine makes as change the way we feel about pain. Helps us to deal with it better. An anti-depressant and mood elevater can do the same thing. Cymbalta has been known to help with mood and help a person deal with pain. I take it. It doesn't take away my pain. But right now, I have a constant arm pain that runs between a seven and nine. It use to be that I never got a break from it. That I would get wore out and discouraged and in despair. But Cymbalta allows me to be refreshed every day from my pain. To be able to start all over in dealing with my pain because I am dealing with. Things don't seem overwhelming even though the pain is bad. I still need the pain medication but don't use it as much when I know others would. My arm hurts that much. I just have built up a tolerance.
If you don't have biofreeze or voltaren, try an otc ointment for pain. I use to use thermacare pain patches until I developed an allergy to the adhesive. TENS units work well to. Cymbalta had the opposite effect on me, making my pain worse and ideations of dying, but I'm ultra sensitive to meds. Heating pads or ice packs are useful to me sometimes. 🙏🌼
Stretch and hang upside down like a bat. Sounds crazy buts helps me alot. I have scoliosis and have a rod with all of my T-spine fused. This is what helps me the most. Explains why I was always the mom taking all the kids to the park- I needed to hang for awhile. Silly kids, all just thought I was nice. Lol.