Hello there Hope, and pleased to "meet" you
The general plan is really quite simple, you just need to fine tune it to meet the specific needs of your girlfriend.
1) Get into a recovery program so that you are free of all drugs and medications that you are taking without a doctors prescription. That can be AA, NA, etc.
2) Have your doctor refer you to a pain clinic or pain specialist that is experienced in treating addicts. They're a lot more common than you think.
3) Follow the doctors directions _exactly_, and spend a lot of time with a good sponsor in whatever program of recovery works for you.
That's the short version. How difficult the above plan turns out to be in real life depends primarily on how willing your girlfriend is to follow the doctors directions. The more willing she is, the easier it will be.
Perhaps if you tell us more about your girlfriend we can come up with ideas that are more specific and useful. Is she in recovery? How long? Does she go to lots of meetings? Have a good sponsor? A good doctor?
Mike