Peter Capaldi was really playing the guitar during the Doctor's big entrance and for Pretty Woman. In real life, Capaldi is an accomplished rock guitarist and once had a band back in Scotland with Craig Ferguson called The Dreamboys.
Michelle Gomez confirmed on Twitter that her tickling a nearby Dalek's bumps when referring to the TARDIS as "the dog's unmentionables" was improvised.
In the "Showrunner Showdown" interview for Doctor Who Magazine 551, Steven Moffat revealed he had wanted his predecessor as showrunner Russell T. Davies to write this episode and sent him an early draft of the pitch. The story behind this original pitch was "almost unrecognisable" from the final episode, focusing on Davros on trial. Moffat suggested the plot would have given the Doctor and Davros' conversations an audience, with the Doctor winning over the Dalek crowd but in the process sympathising with his longtime enemy. Ultimately, Davies was not interested, and Moffat wrote the episode himself.
The planet Karn has appeared before in the new and original series. The Fourth Doctor visited Karn in "The Brain of Morbius" and the Eighth Doctor visited Karn during The Night of the Doctor (2013).
Peter Capaldi had a say in picking the guitar and described it as "...like a Fender Stratocaster that had been described to someone who had never seen one...That (joke) is hilarious, if you're into guitars..."