In Act 2, Scene 2 of Shakespeare's Hamlet, the prince asks the First Player to perform The Murder of Gonzago — a play depicting a king murdered by poison poured in his ear.
Hamlet intends to observe King Claudius's reaction during the performance. The play mirrors the ghost's account of King Hamlet's murder — Claudius pouring "juice of cursed hebenon" into his sleeping brother's ear.
Hamlet: "The play's the thing
Wherein I'll catch the conscience of the king."
The "play within a play" is Hamlet's empirical test — turning art into evidence.