The song will appear on the soundtrack for the animated movie, "The Smurfs 2."
Spears, 31, introduced the track publicly for the first time on Ryan Seacrest's radio show Monday morning, People.com said.
"They were actually really, really good on set," Spears told Seacrest about her sons. "They were, like, acting, and my oldest son, Preston, was right on cue every time they would tell him to do something... Later on, I got to see what they actually did on camera and it was adorable."
The singer went on to say she agreed to record the song because her sons are "obsessed" with the smurfs.
"We've seen 'The Smurfs' movie a million, trillion times," she said.
Celebrity Couples of 2014 [PHOTOS]