To get signed a record deal by a major label, do you professionally record the song first?

So should I go to a recording studio first or should I get a manager who can get major labels to listen to my demos? I know recording studios are expensive, I just want to know which comes first: recording a song or getting a record deal.
2 answers 2