Morphine has been widely used as a pain reliever for a very long time (according to Wikipedia, it's been in use at least since 1804!). It's even listed (twice!) on WHO's list of essential medicines. However, it isn't really used for treatment of diseases -- its only real use is for pain relief.
Since we know that one may only violate Shabbos for a חולה שיש בו סכנה (patient who is in danger for his life) for things that have to do with saving that patient's life (see Rambam, Hilchot Shabbos 2, Shulchan Aruch, Orach Chaim 328), if we would have to be מחלל שבת in order to administer morphine1, would we be allowed to violate Shabbos for morphine?
1 It's debatable whether any injections are Biblical Shabbos transgressions, see שמירת שבת כהלכתה ch 32:58, and footnote 151 there; morphine is actually affected by this discussion because it's most often administered by IV. For the purposes of this discussion, let's assume that there is some universally agreed-upon Biblical transgression involved, such as driving a car in order to get it or something.