Pilates is excellent for the prevention of back pain and injury.
Pilates is also effective after the initial phases of an injury have passed, to help heal, stretch and strengthen.
When Pilates is taught by a qualified professional, it is effective in posture education, which will help to prevent re-injury. The operative phrase here is "qualified professional". You want to be sure your Pilates instructor is skilled, or better yet, seasoned, in matters of back and neck pain.
Below are a few resources that may help you find the best Pilates experience for your back and neck: