I've often attacked our modern mania for turning movies into plays. But, in the case of Shakespeare in Love, the transformation is fully justified. Even more than the original screenplay by Marc Norman and Tom Stoppard, Lee Hall's new version is a love letter to theatre itself, and one that celebrates the way magic and mystery are born out of chaos and confusion.

The story is, at heart, a romantic comedy in which the young Shakespeare finds himself falling for the courtly Viola de Lesseps, who has disguised herself as a boy-player in Henslowe's company. But this is buttressed by the idea that nothing much changes in theatre and that London's Bankside in 1593 was much like modern Broadway. Money men assert their power, scripts get rewritten, egos have to be massaged and last-minute crises intervene. Somehow Shakespeare even manages to turn the distinctly unpromising Romeo and Ethel, Daughter of the Pirate King into the tragic love story we know today.

But the skill of Hall's script lies in having it both ways. On the one hand, it suggests commercial theatre is a timelessly precarious business: on the other, it flatters us with its references to the specific conditions of Elizabethan theatre.

"Verona again," people groan as Shakespeare opts for yet another Italian setting, Marlowe selflessly helps Shakespeare conquer his writer's block, and the passionate relationship between Will and Viola follows the arc of that of the lovers, divided by familial circumstance, in Romeo and Juliet.

Just occasionally, the play becomes archly knowing: at auditions, one actor after another parrots the same speech from Marlowe's latest hit. But, for the most part, the play manages to be witty and warm-hearted at the same time. I especially liked the way the moneyed Fennyman, thrilled to be offered a small part, becomes an obsessive thesp, and the idea that Tilney, the censorious Master of the Revels, turns into a yellow-stocking'd Malvolio. And there is something touching about the way Viola asserts her freedom while knowing that she can never finally escape the confines of her class.

But it is the masterly direction and design by the Cheek By Jowl team of Declan Donnellan and Nick Ormerod that vindicates the decision to adapt the piece for the stage. The set has the galleried shape of an Elizabethan playhouse and, in a clever transformation that has echoes of Noises Off, we get a backstage point-of-view of the climactic Romeo and Juliet. Paddy Cuneen's music also has the seductiveness of Renaissance dance and there is, unbelievably, a company of 28 actors.

Lucy Briggs-Owen is especially memorable as the shape-shifting Viola and exudes genuine erotic ardour. Tom Bateman rightly plays Will as an apprehensive theatrical apprentice only gradually discovering his dramatic voice. And there is strong support from David Oakes as the more theatrically confident Marlowe, Ferdy Roberts as the purse-providing Fennyman, Paul Chahidi as the harassed Henslowe and Anna Carteret as a downright, commonsensical Queen Elizabeth. Many of the best lines admittedly come from the famous film. But this is a play that stands on its own two feet as a heady celebration of the act of theatre.