A 55-year-old female patient with a history of breast cancer treated 3 years ago (currently in remission) presents with new-onset severe, unremitting thoracic back pain, worse at night and not relieved by simple analgesia. She also reports leg weakness. What is the most important initial investigation to arrange urgently?