How can I earn a MT real estate license if I'm not a MT resident?

You need to follow the same steps as a Montana residence. That includes the 70-hour pre-license education, passing the exam, and submitting the license application.