There is lots of literature about the placebo (and nocebo) effect. The New Scientist publication “Nothing” has a couple of articles about it. In the opening one a co-author takes part in an electric shock placebo experiment fully understanding what is happening and still found the placebo effect worked on him.