'We all knew Adam as the quiet bloke who filled the lettuce shelf in Marks & Spencer.

I didn’t even know he was into music,” said an old school friend of the star who this weekend is the first Scot to top the American charts for 18 years. “He was hardly ever out like the rest of us.”

Growing up in Dumfries, Calvin Harris – real name Adam Wiles – certainly kept quiet about his artistic aspirations, even though he was sending out hundreds of demos from his bruised and battered £200 antiquated Amiga home computer.

He may have started out tinkering with tunes in the bedroom of his parents’ home as a 14-year-old, but today his collaboration with superstar Rihanna, We Found Love, sits at number one in America.

When Harris, now 27, was a teenager in Dumfries, Friday nights would find the budding singer-songwriter, record producer and DJ sitting at home creating tunes.

After leaving Dumfries High School, he stacked shelves in a local supermarket by day while secretly writing songs and DJ-ing in his bedroom by night.

But fast-forward five years from his time with Marks & Spencer and Harris can count superstars among his friends.

We Found Love also topped the charts in the UK for three weeks last month and currently sits at number two in the Official UK Charts.

The last Scot to get to number one in America was Rod Stewart, who topped the US charts with Sting and Bryan Adams, with the hit All For Love in January 1993.

With a series of hits under his belt, Harris is now one of the leading lights of British dance music. It wasn’t an easy journey. Today Dumfries, like many Scottish towns, bears the scars of the recession. Too many shops in the town centre are shuttered and closed for business.

Harris struggled to find stable work there – he went from fish gutter to bakery assistant to shelf-stacker – until he threw himself into his music career.

Slogging away, he used all his wages to pay for his ever-expanding bedroom studio. Then he joined MySpace, and the website changed his life forever.

Two of his bedroom-produced tracks, Acceptable In The 80s and The Girls, which he posted on the website, helped him land his Columbia deal in 2006.

He secured a publishing contract with EMI Music, and was touted as a songwriter and producer to the stars.

Among the first to take notice of his talent was Kylie Minogue, who hired him to pen two songs, which turned out to be Heart Beat Rock and In My Arms, both tracks making it onto her 2007 album, X.

Since then, Harris has become something of a one-man hit machine responsible for penning songs sung by Dizzee Rascal, Sophie Ellis-Bextor, Kelis and Rihanna among others.

In The Coach & Horses Inn, tucked away in a small cobbled Dumfries street, regulars fondly remember the rare occasions when Harris would leave the confines of his bedroom for a little R&R with the locals.

“Calvin, or Adam, is a very pleasant young chap, always has been. I’ve never heard a bad word said about him,” said John Owens, who owns and runs the pub.

“He’s always been a very quiet lad. We’re all very proud of him. He’s not been in the pub for a few years now, but when he’s home he’ll pop in – if he gets the chance.”

The pub is now basking a little in the reflected glow of Harris’s stardom. In the corner, beyond the fire place, locals point out, is where he would chat and have a quiet drink with his mates. It is now almost being treated as hallowed ground, and a signed poster of Harris’s first album cover, for I Created Disco, hangs on the wall.

In a nearby chip shop on Dumfries High Street, customers and staff are chatting about the local hero. A man in a jeans and a tracksuit top shouts to the young woman behind the counter: “Did you see that Harris lad is number one again? It’s crazy.”

She replies, shovelling chips into a container: “Every time I see him on telly and in music videos, I still can’t believe he comes from round here. Imagine coming from here and then ending up working with Rihanna.”

During those eight years in his bedroom, the ideal future role Harris envisaged for himself was that of producer.

A reluctant pop star, he is still trying to make sense of it all and earlier this year, the 6ft5in Dumfries DJ admitted he would no longer sing on his tracks.

He said: “I’m not going to grab the mic and burst into song. That’s it for me. I just DJ the song. I don’t think I’m good enough as a singer to justify the amount of time I spent on it. That’s time that could be spent on making new tracks.”

Whatever he decides to do, however, Harris knows he can count on the undying loyalty of his home town.

While home for Harris may no longer be Dumfries, he still has plenty of fans there.

In a tiny record store near the River Nith, locals beam as they chat about their “Dumfries superstar”.

“Folk here really like his stuff”, remarked one older fan. “He’s fantastic and it’s not just the young ones that like his records either.

“Aye, the boy done good. He’s definitely a local hero.”

Harris’s third album is due out next year and will include singles Bounce and Feel So Close, both of which made number two in UK charts.