Image copyright Getty Images Image caption Miriam Teak-Lee (centre) re-interprets Justin and Britney's biggest hits in the West End musical & Juliet

Spoiler alert: At the end of Romeo and Juliet, Romeo and Juliet die.

Juliet's taken a sleeping potion and Romeo thinks she's dead, so he drinks a vial of poison. When Juliet awakens and discovers his corpse, she stabs herself in the heart.

"O happy dagger, / This is thy sheath," she says, before collapsing onto Romeo's lifeless body.

But what if she didn't? What if Juliet dropped the dagger and ran off to Paris to rebuild her life?

That's the jumping off point for a new West End musical, & Juliet, which depicts the heroine on a post-traumatic journey of self-empowerment, while belting out the hits of Britney Spears, Katy Perry and Justin Timberlake.

If this all sounds like the product of a concussed writer's fever dream, that's because it is.

Major pop hits

Playwright David West Read came up with the idea four years ago, after slamming his head into a cupboard in the kitchen of his rented apartment.

He'd recently been asked to pitch a musical based on the songbook of Swedish pop powerhouse Max Martin so, after briefly ignoring his symptoms to watch a 3D screening of Star Wars: The Force Awakens ("the worst thing I could have done"), he retired to bed and started researching.

"I didn't actually know who Max Martin was until I Googled him," he confesses, "But in my concussed state, I made this Max Martin playlist which was, like, 150 tracks; and I suddenly realised that he'd written so many of my favourite songs from the past 25 years."

In fact, Martin is the third most-successful songwriter in US chart history, with credits on 22 number one singles. Only Paul McCartney (32) and John Lennon (26) have more.

Image copyright Getty Images Image caption Max Martin has written and produced hundreds of hits over his 25-year career, working closely with Britney Spears

He is the man who introduced us to indelible choruses like, "Oops! I did it again", or "I kissed a girl and I liked it", or "Hit me baby one more time"; and who helped Taylor Swift mastermind her transition from country music to globe-straddling pop megastardom.

As Read delved into the playlist, one thing became clear.

"You could make five musicals with the material that was there," he says. "But there's a lot of songs about love, a lot of songs about heartbreak, and a lot of songs about second chances. So I came to this idea of Romeo and Juliet, and a new beginning for Juliet."

The key to unlocking the character was one Britney Jean Spears.

"She became a through-line for Juliet," says Read, "because there's these two Britney songs: ...Baby One More Time, which has the line, 'My loneliness is killing me'; and Stronger, which is, 'My loneliness ain't killing me no more', which became this perfect bookend to her story."

But & Juliet isn't just concerned with its titular character... In fact, the musical opens with William Shakespeare and his wife, Anne Hathaway, arguing about the ending of his great tragedy. Hathaway grabs control of the quill, and the couple tussle over the development of the play - cleverly deploying the Backstreet Boys' I Want It That Way as the soundtrack.

"Max is the first to admit that the lyrics to that song don't really make sense," laughs Read. "Basically every other line contradicts the line that came before it. So the natural way to make sense of that is it's an argument between two people."

Read - a producer and writer on the hit sitcom Schitt's Creek, whose previous Broadway show was a comedy about the adult film industry - instantly won Martin over with his witty, meta-textual take on Shakespeare.

The musician had been wary of "jukebox musicals" that become allegories for the music industry (hello, Viva Forever), preferring the universal appeal of something like Mamma Mia!

"I wanted it to be a great story because I'm insecure, because I'm a songwriter," he told the BBC's The One Show in a rare interview last week. "So I'm thinking everyone that comes into this room, they're going to have to love it, even if they haven't heard the music."

Image copyright & Juliet Musical Image caption Miriam-Teak Lee takes the lead role in the musical, and helped rewrite Juliet to suit her own character

Image copyright & Juliet Musical Image caption The freewheeling plot also gives Romeo a chance at redemption

After hiring Read, the next crucial step was to find a Juliet; and they struck gold when they discovered Miriam-Teak Lee, a young actress who, at the time, was the understudy for all three Schuyler sisters in the London production of Hamilton.

"I remember reading the story and just thinking, 'this is incredible, I love it,'" she says. "And like David, I didn't know anything about Max Martin, so I was just blown away when I found out who he was."

One of her first tasks was to perfect Juliet's opening number, and she insisted on going through the melody line by line with the show's musical director Dominic Fallacaro (a process known in the musical theatre world as "note-bashing").

"I remember Dominic being like, 'Really? Do you need a note bash for Britney's ...Baby One More Time?'" she says, "But I just wanted to get it right, because it was done in a completely different way. It was much slower and it forced me to really listen to the lyrics, which intrigued me so much.

"When I heard it like that, I already wanted to see where Juliet was going to go, where this was going to take her."

As it turns out, even Read didn't know where Juliet would end up. Casting Lee changed the show beyond recognition, as the actress's irresistible spirit and humour began to bleed into her character.

"I had this idea that Juliet was going to be this meek, obedient, subservient girl, who learns to become empowered," says Read. "Then Miriam-Teak walked in and she was like, 'There is no version of that that is going to work!'"

"In the beginning, we were like, 'Is she this vulnerable character?'" recalls Lee, "and then we did the workshops and I was like, 'No, I think she's always had this inner strength,' and it's just about putting her in a situation where she's allowed to let that out."

Read jumps back in: "If I can speak about her like she's not in the room, Miriam-Teak has this intelligence, confidence and self-assuredness; and because she's such a powerhouse as a vocalist and as a person, that's how we came up with this empowered version of Juliet that feels way more 2019.

"It's not as simplistic as going, 'Stand up to the patriarchy!' or 'Women should have a voice!' It's about saying, as a young person and as a young woman, I know who I am and I don't need to apologise for that. And I think that feels like a more dynamic character than where I was four years ago."

In the musical, this is exemplified by the use of Demi Lovato's ballsy pop banger Confident. Originally, it was used to illustrate Juliet discovering her inner confidence. In the finished version of the musical, she's using it to educate the rest of the cast.

"She's saying, 'Look, I did stand up to my parents in the original play and I've learned some things that I'm gonna pass on to the rest of you,'" says Lee.

It's not the only element that was transformed during the workshops and previews that built up to the musical's West End official opening this weekend.

In particular, Read spent months trying to shoehorn Adele's Send My Love (To Your New Lover) into the score.

"We tried it in, like, five different places. That's how much I wanted it in," he says. "But as much as I wanted Adele in the musical, it just didn't serve the story.

"But that's the cool thing. If it was a new musical where someone had written all the songs, and you said, 'We're not going to use it,' that song would disappear forever. But Max had already written all the songs, so we were a bit more free to play around with which ones were in or out".

Image copyright & Juliet Musical Image caption Cassidy Janson, who previously played Carole King in the musical of her life, plays Anne Hathaway

The final tweaks were made during a four-week trial run in Manchester last month, with early reviews praising the show's "belly laughs" and Lee's "truly dazzling" vocals on Katy Perry's Roar ("That's the most full-on song," she admits. "It's so thrilling to sing but you have to give it everything.")

But it was the reaction of the audience that gave the team true confidence.

"There was one woman who said she came 28 times," says Read.

"I mean, there were 32 shows, so I want to know why she didn't come to those four extra nights!

"But I feel like that's a good sign, when people want to come back."

& Juliet opens at London's Shaftesbury Theatre on 2 November, with the cast recording to follow on 15 November.

Follow us on Facebook, or on Twitter @BBCNewsEnts. If you have a story suggestion email entertainment.news@bbc.co.uk.