“The Shakespeare Code” is the second episode of the third series of the revived British television series Doctor Who, first broadcast on BBC Oneon 7 April 2007. According to the BARB figures this episode was seen by 7.23 million viewers and was the fifth most popular broadcast on British television in that week. Originally titled “Love’s Labour’s Won” the episode was re-titled as a reference to The Da Vinci Code.
In the episode, the alien time traveller the Doctor (David Tennant) takes his new travelling companion Martha Jones (Freema Agyeman) in her first trip in time and space. The Tenth Doctor, who promised to take Martha on one trip, takes her to a performance of Love’s Labour’s Lost at the Globe Theatre in Southwark in 1599. At the end of the play, William Shakespeare announces a forthcoming sequel entitled Love’s Labour’s Won. A witch called Lilith uses a voodoo doll to influence Shakespeare to declare that the new play will premiere the following evening. When Lynley, the Master of the Revels, demands to see the script before allowing the play to proceed, Lilith plunges a voodoo doll made of his hair into a bucket of water and stabs it in the chest. Lynley collapses on the ground dead. Lilith compels Shakespeare to write a strange concluding paragraph to Love’s Labour’s Won before flying away on a broom.
In the morning, the Doctor, Martha and Shakespeare proceed to the Globe Theatre, and the Doctor asks why the theatre has 14 sides. They decide to visit the architect of the theatre in Bethlem Hospital. They find the architect, Peter Streete, in a catatonic state. The Doctor helps him emerge from his catatonia long enough to reveal that the witches dictated the Globe’s tetradecagonal design to him. The witches Lilith, Doomfinger, and Bloodtide observe this through their cauldron, and Doomfinger teleports to the cell and kills Peter with a touch. The Doctor identifies the witches as Carrionites, a species whose magic is based on the power of words which allows them to manipulate psychic energy. By uttering the name Carrionite the Doctor is able to repel her.
The Doctor deduces that the Carrionites intend to use the powerful words of Love’s Labour’s Won to break their species out of imprisonment. The Doctor confronts Lilith, who explains that the three witches were released from their banishment by Shakespeare’s genius words after he lost his son Hamnet. Lilith temporarily stops one of the Doctor’s two hearts and flies to the Globe Theatre. Shakespeare fails to stop the play from being performed. The actors speak the last lines of the play. A portal opens up, allowing the Carrionites back into the universe. The Doctor tells Shakespeare that only he can find the words to close the portal. Shakespeare improvises a short rhyming stanza but is stuck for a final word until Martha blurts out Expelliarmus, an imaginary spell from the book series Harry Potter. The Carrionites and all the copies of Love’s Labour’s Won are sucked back through the closing portal.