Genie (It's Behind You!)

A genie in a magic lamp, bound to grant three wishes to whoeveer held the lamp, was a fictional character in at least one common panto. A real version of the genie existed, residing in "another realm".

As a result, an old magic lamp prop was one of the props stored in the understage area of one theatre where the Thirteenth Doctor, Yasmin Khan and Dan Lewis came to see Cinderella. After the Doctor used a link from Spacebook in an effort to bring "the magic of pantomime" to the performance, the props and costumes were replaced with real versions, "snatched" from other places and realms. Most of them were antagonistic, but the Doctor managed to find the now-real magic lamp and summon the genie, using the first of her three wishes to wish her friends safe — causing the genie to use his magic to send back the fictional villains to whence they came. The genie remained, however, and Dan suggested they use the Doctor's second wish to give ice cream to everyone in the theatre — including the genie himself, who seemed surprised but not displeased by the gift. (COMIC: It's Behind You!)

Behind the scenes
Although the panto from which the magic lamp originates is not identified, it is presumably Aladdin, making this genie the Genie of the Lamp from that story. The Robin Williams-voiced Disney iteration of this character had previously been mentioned in The Christmas Cracker Conundrum!.