It’s a great story actually. “the play’s the thing” was the natural title, but too long for an http address, so googling the phrase brought this story with this wonderful word:
I’ll have grounds
More relative than this—the play’s the thing
Wherein I’ll catch the conscience of the King.
Hamlet Act 2, scene 2, 603–605
When exclaiming “The play’s the thing!” we’re seldom asked the embarrassing question of what “thing” we mean, exactly. Prince Hamlet, however, has something specific in mind. To elicit visible proof of what a rather visible ghost has told him—that his uncle, King Claudius, murdered his father, the former king—the prince turns playwright. His task: to sneak a few telling lines into a play about regicide his uncle will be watching at court, and to wait for Claudius to flinch. If Hamlet’s plan works, he’ll be convinced of both the ghost’s veracity and the king’s guilt and will (theoretically) feel better about paying his uncle back in kind.
The plot is intricate and bizarre, but Hamlet is relying on good, solid Renaissance psychology. Playwrights often claimed that their work encouraged virtue in upstanding citizens and caught the conscience of malefactors. About ten years after the first production of Hamlet, playwright Thomas Heywood edified the reading public with this real-life tale: During the performance of a particularly gruesome tragedy, in which the actors staged the murder of a man by driving a nail through his temple, a woman in the audience rose up distractedly. She “oft sighed out these words: Oh my husband, my husband!” The woman subsequently confessed all and was burned for having murdered her spouse with “a great nail” through “the brainpan.”