I'd personally say, persaude her to talk to someone about it, chronic pain is frankly, horrible. I've mentioned my weight several times on the forums, essentially caused from depression and lack of activity all stemming from chronic pain.
Theres several things to work out though, losing weight and exercise have NOTHING, at all to do with each other. exercise improves you endurance, it makes you healthier, but you can be 18 stone of fat and run a marathon, or 6 stone underweight an incapable of walking to the end of your road.
I lost 5 stone or more, without exercising basically at all, leading an incredibly sedentary life due to chronic pain in both my knee's, the more I walk the more pain I get so I generally sit about a lot.
The thing is, for years I didn't know that, for years I listened to the crappy advice around of, do 30 mins exercise a day and you'll be fine, what bullcrap. I ate pretty well not great, too much refined carbs but wouldn't eat badly but I wasn't shifting weight and every time I'd go to the gym and try to lose weight by getting fitter it ended up in small weight loss from eating better, massively increased pain eventually leading to the point I couldn't continue and I'd give up, i'd get more depressed and i'd give up eating properly as I'd had it drilled into my head that if I wasn't excerising I wouldn't lose weight, so why deprive myself of the foods I liked. Thats where people lose out. even more so if you've got any kind of problem causing chronic pain.
Don't encourage her to exercise, its a killer for chronic pain sufferers, even more so if you have pain basically anywhere in your legs as you really can't do endurance/weight loss type exercise without using your legs a lot. She needs to eat well, and thats it, she eats well she'll drop the pounds, feel better, her feet will hurt less and she'll be less unhappy, less depressed and not want to eat so much.
But the killer in these situations is that when you've got pain and don't want to do anything physical and everyone for years has told you thats the only way to lose weight, you've lost the willpower before you start.
Steroid injections are sweet though, but never made me gain weight and I don't think should really make anyone actually gain weight, its not the right type of steroid, nor is it anywhere it should be or doing anything it should be, cortisol(which I think it will probably be) can lead to the body wanting to retain fat more, but only if you're eating so much excess that there is extra calories to retain, if you're eating right for what you need, steroid injections won't make you gain weight.
as for the rest, anyone that says she's still beautiful on the inside, appearance doesn't matter, what pie in the sky crap. You literally can't help who you're attracted to physically, its something you developed over decades, if she isn't attractive to you anymore you shouldn't feel guilty about it, and its obviously up to you if you still want to be with her when you can't feel physically attracted to her anymore. Keep in mind though that if she eats bad, and cooks all the food, you'll eat worse eventually, and if she ends up a size 30 cooking crap for your kids your kids will likely end up fat and unhappy aswell.
Personally, having a parent who fed me crap for years, feeling quite resentful of a childhood where I wasn't happy, I don't think I could really be happy with a fat wife, thats life. I also couldn't be with someone who is going to be unhealthy and teach our kids the wrong things. If she can't be responsible for her own health, theres very little chance she'll feed your kids different things if she thinks bad food is good enough for her.
Try and help her turn it around, lose weight, get healthy and get happy of course, but if after a certain amount of time she refuses to get healthier don't feel guilt about leaving. Its her choice, not yours.