In fact, the researchers found that expecting something to be less painful than it actually is has about the same effect as morphine does on deadening pain. In other words, according to these findings, pain is largely subjective. If we expect something to be extremely painful, we may very well experience it as such. That's one reason why for one person getting a shot at the doctor's office is nothing more than an annoying prick, while for another it's nearly akin to torture.
None of this is to say that you should try to convince yourself that touching an open flame or some other painful stimulus is no big deal. Just because something doesn't feel painful doesn't mean that it's not harmful. But this research does suggest new, thought-powered ways to combat pain from injury and illness.