The Fleetwood Mac frontwoman took to the stage after the cast of the hit Broadway musical took their curtain call, joining its young stars to sing the band's song Rhiannon.

School of Rock is based on the 2003 Jack Black film, which told the story of an aspiring musician who takes a job as a substitute music teacher and cajoles his pupils into forming a rock group.

Backed by the band, Stevie brought the audience at the Winter Garden Theater to their feet with her rendition of the 1975 hit.

"I have Fleetwood MAC, and then I have my solo band that I've been playing with since 1980, and now I have one more fantastic band to add to my roster, so I'm very happy," she told the Associated Press.

Speaking backstage, the star also shared her memories of working with Prince, who died last week (end22Apr16) aged 57. The Purple Rain singer played the synthesiser uncredited on her solo 1983 hit Stand Back, which was inspired by his track Little Red Corvette.

"I asked him if he would come over to Sunset Sound (recording studios) in Los Angeles," she recalled. "Never in a million years expecting that he would say yes, or that he was even in Los Angeles, and he was there in like 20 minutes.

"I didn't have to call and tell him that I kind of ripped off his song, but I did because I'm honest. So it turned into a really amazing relationship. Is my heart broken? Absolutely."

The star's surprise performance was to help support Broadway/Equity Cares, a charity which provides support to AIDS sufferers which is funded by performers in New York's theatre industry.