Both the placebo and the memory task reduced pain substantially—but independently of one another. What’s more, the placebo did not affect performance on the cognitive task. Together, these findings indicate that placebos do not require executive attention and working memory to be effective. In other words, it’s highly unlikely that expectations bring relief by altering cognitive function.
The placebo effect is an interesting area of study. Personally, what's weird to me is that even though I am aware of the effect, that brand name ibuprofen and generic ibuprofen are pretty much the same, I cannot take generic ibuprofen tablets because they don't work on me (after several attempted I simply gave up and just stuck with brand name).
This video shares some interesting aspects of placebo effects.