Goldfinger opens with a shot of a floating fake duck that turns out to be attached to a wetsuit-clad Sean Connery as James Bond. He clambers out of the water, shoots a climbing rope from a gun, overpowers a security guard, plants a plastic explosive and peels off his suit to reveal a white tuxedo. Bond goes on to see the reflection of a knife-wielding baddie in the eyes of the girl he is kissing and overpowers him. Cue Shirley Bassey’s immortal theme tune: “Goldfinger, he’s the man / The man with the Midas touch …”

Goldfinger.

In 1964, the third Bond film (after Dr No and From Russia With Love) set the tone for the opening minutes of every Bond movie since. An action sequence is followed by the epic theme tune, the songs themselves defining eras and tracing pop’s development through use of the biggest names available: Bassey, Paul McCartney, Duran Duran, a-ha, Madonna, Sam Smith and Adele. This year, 18-year-old Billie Eilish becomes the youngest ever artist to soundtrack a Bond film, co-writing the theme to Bond’s 25th outing, No Time to Die, with her brother, the producer Finneas.

Eilish has described the news as “a huge honour”, but the author and Bond expert Nick Parkhouse says the theme songs are little more than advertising jingles for the movies, seeking to identify the films with big songs, big voices and big stars. “It’s always been about marketing and exposure, not artistic vision,” he says. For the stars, the Bond gig offers what the University of Huddersfield music lecturer Catherine Haworth calls “a chance to be part of a cultural phenomenon, the longest-running film franchise in history and one of the most recognisable literary and film characters ever”. Of course, there’s the publicity and everything that goes with it. Another impetus, obviously, is megamoney.

Billie Eilish … ‘huge honour’.

Not all Bond songs are huge hits, but most are. And it doesn’t always matter if they aren’t. When Parkhouse interviewed Sir Tim Rice, he was amazed to be told that the award-winning lyricist’s theme for 1983’s Octopussy (All Time High, sung by Rita Coolidge, which limped to No 75) was one of his highest-earning songs: “Because Bond songs go on every compilation.” Thus, while the films’ producers (first led by Albert “Cubby” Broccoli and subsequently his daughter Barbara) approach the stars, artists also submit music for consideration: rejected artists include such big hitters as Eric Clapton, Blondie, Pulp, Radiohead and Pet Shop Boys.

So is there an art to writing a moneyspinning, high-exposure Bond theme? They certainly follow formulas. A template was laid down by Monty Norman’s signature James Bond Theme in Dr No (as featured in numerous Bond films since) – dramatic orchestral stabs, a mix of cool and kitsch, the sort of tune that might play in a backstreet casino just before a murder. With some exceptions (notably Carly Simon’s Nobody Does It Better for The Spy Who Loved Me and Sam Smith’s Writing’s on the Wall from Spectre), Broccoli insisted that the film and song must share a title.

Although Lionel Bart composed the first sung Bond theme, From Russia With Love, as a romantic ballad for Matt Monro, the York-born composer John Barry (often in tandem with the lyricist Don Black) laid down the “Bond sound” with Goldfinger: a mix of jazz, brass and twangy guitars, classical orchestrations and the “suspense motif”, a descending four-note motif heard in all his Bond scores. When Adele’s songwriting collaborator Paul Epworth listened to 13 consecutive Bond themes to write the song for 2012 movie Skyfall, he noticed that they all had a major ninth as the “harmonic code”. The University of Leeds music professor Dave Ireland observes that many of the songs “make use of minor keys and melodic themes that have been used in earlier Bond films” to establish a sense of franchise continuity.

The formula has undergone periodic reinventions. McCartney took things in a thrilling, rockier direction for Live and Let Die (while observing “you’ve got to keep vaguely within the format”). Duran Duran combined Bond stabs and new romantic pop for A View to a Kill, while Madonna’s techno anthem, Die Another Day, was not universally loved. Perhaps she forgot another Bond dictum: the artist is never bigger than the film. Parkhouse suggests that there is a fine line between homage and pastiche. “Adele stayed the right side of it, but Sam Smith fell over with Writing’s on the Wall [reportedly written in 20 minutes], a parody of a Bond theme. No one could name it as the theme from Spectre because it didn’t share the title.”

Sam Smith: Writing’s on the Wall – video

As for lyrical content, the University of Sunderland lecturer and Bond aficionado John Paul Green says that Goldfinger established the spirit of the Bond formula as “exotic, decadent and powerful”. The “man with the Midas touch” beckoning you to “enter his web of sin”, says Green, “promised intrigue, sex and seduction. The song may be about the villain, but it laid out the key ingredients to a Bond movie – ‘martini, girls and guns’, as Sheryl Crow [who sang the theme for 1997’s Tomorrow Never Dies] later noted.”

In their strength and diva expertise, they’re an ironic comment on his limitations. They’re the women: Bond is a boy

Green observes that the Bond films began by selling us “a fantasy of male potency, where the man ‘always runs while others walk’, courtesy of Tom Jones’ Thunderball [1965]. And in terms of female submission and seduction, women would enter a ‘web of sin’ or claim that ‘nobody does it better.’” It’s hard not to wince at the revelation that Bassey was told to sing Diamonds Are Forever as if she were singing, “Touch it, stroke it and undress it,” to a penis. (This didn’t stop the Queen asking her to sing it for the monarch’s 90th birthday.) Bassey was also reputedly required to remove her bra to enable her to hold the song’s crucial final note.

Haworth argues that for all the genre’s problematic elements, Bond films aren’t alone in reflecting the era they are made. “The frequent reliance on strong, well-known, identifiable women may be a way of not counteracting but confusing those often sexist visuals. You can read it as misogynistic, but that’s to deny Bassey’s agency as a performer and her creative interpretation. It’s a balancing act.”

Lucy O’Brien, the author of She Bop: The Definitive History of Women in Popular Music, agrees, noting how while women in the early Bond films were “glamorous decoration”, she sees the singers – Bassey, Springfield, Dusty, Adele – as “almost counterpoint, as detached and ironic as Bond. In their strength and diva expertise, they’re an ironic comment on his limitations. They’re the women: he and other men are boys.”

Bassey sang “unlike men, diamonds linger”. Bond mocked himself as early as Goldfinger (quipping that carrying a gun reflected a “slight inferiority complex”) and by 1995’s Goldeneye, Judi Dench’s M was able to call 007 “a sexist, misogynist dinosaur”. As the character has changed – he is less promiscuous, and Pierce Brosnan and Daniel Craig have brought more reflection and vulnerability to the old ham in recent years – so have the songs.

Monica Germana, the author of Bond Girls: Body, Fashion and Gender, argues that while the older films especially “present some problematic gender politics”, the female voices “frequently expose issues we are now more openly challenging”. She says that Bassey’s Goldfinger “exposed the dangers of patriarchal control” when she sang: “Golden words he will pour in your ear / But his lies can’t disguise what you fear”; 31 years later Tina Turner’s Goldeneye “almost subverts Goldfinger with ‘Goldeneye, I found his weakness, he’ll do what I please.’” kd lang’s sublime Surrender didn’t become the theme tune for Tomorrow Never Dies (1997), but was used in the credits, and finds the Canadian singer asserting: “Your life is a story, already written / The news is that I am in control / And I have the power.”

Tina Turner: Goldeneye – video

While it may appear incongruous that a staunch feminist such as Garbage’s Shirley Manson would sing Bond, Germana says that Don Black’s lyrics for 1999’s The World Is Not Enough (“I know how to hurt, I know how to heal / I know what to show and what to conceal / I know when to talk and I know when to touch / No one ever died from wanting too much”) “point to the pivotal function of female desire in the endorsement of Bond’s fantasy masculinity”.

So, for Germana, Eilish won’t just take No Time to Die to a younger audience, but – along with Barbara Broccoli’s insistence on stronger female characters in the new film – “her uncompromising femininity embodies the perfect answer to any lingering doubts about the franchise’s awareness that gender politics must be addressed”. Indeed, you get the feeling that Eilish could humble Bond with just a single withering look.

No Time to Die is released in the UK on 2 April and the US on 10 April