In most cases, Pilates can help by strengthening your core muscles to help support your spine and teaching you to improve your posture.
But be careful. Make sure your teacher has appropriate qualifications, so you are taught suitable exercises. The size of the class is also important. More than 12 in the class is likely to mean that the teacher cannot supervise and teach you properly.