Back problems and working out?

So I have been trying to lose weight off and on for years now. I got close to my target weight (I got down to 188) before but due to depression and physical pain, I gave up and gained a lot of it back. So, I'm starting over but going to do it better!

I have already lost around 30lbs from dieting alone. I started this time at around 270 and im now down to about 240. (I used to be 330lbs at my max weight) my target weight is any where from 175-180 as I am 6 foot tall.

Any way, I haven't been exercising very much because I am in a lot of pain and discomfort all day, every day.

I have scoliosis with 3 curves in my back. One between my neck and shoulder, one is in my lumbar and the other in my hips. (Don't know the names of those areas of the spine) the curves aren't huge, but they put pressure on my disc's and cause a lot of pain. The curve in my shoulders and neck has caused nerve damage in my neck and causes a lot of burning due to the nerves and tendons being pulled to the right with my spinal curve.

I get a lot of pain and weakness in my legs as well because of my lubar and hips being tilted and rotated, so even doing squats is hard for me as one of my hips rolls out of socket if I go to far down, even when I do them right. Or push ups and wall presses, my shoulder rolls to the left and it makes me lead so I can't come down straight.

In the past. I FORCED my body to try and do some of the exercises that hurt me, and they made my issues worse. So I am trying to find some alternatives so I can get into shape.

I've done yoga in the past and I loved it, and I'm going to get back into it. But I don't know about anything else. Maybe swimming or pilates?