Image copyright Khalil Rafati Image caption Khalil Rafati's life had been destroyed by drug addiction

As Khalil Rafati overdosed on heroin for the ninth time the paramedics frantically tried to save his life.

A drug addict who slept rough on the streets of Los Angeles, he eventually regained consciousness after the medical team used a defibrillator to give him an electric shock.

This was back in 2003, when Khalil was 33 years old. Also addicted to crack cocaine, he weighed just 109lb (49kg), and his skin was covered in ulcers.

"I was arrested more times than I can remember [for drug offences]," says Khalil. "I was completely messed up... I was always in so much pain that I couldn't sleep."

While Khalil had tried and failed to get clean before, he says that after his ninth overdose he finally realised that he had to change his life in order to save it. So he spent four months in a rehab centre - and has been drug-free ever since.

Throwing himself into healthy living, Khalil has been so successful in rebuilding his life that today he is the millionaire founder and owner of fashionable Californian health food business Sunlife Organics.

Image copyright Khalil Rafati Image caption Khalil has transformed himself since 2003

With annual sales of more than $6m (£4.8m) from its six outlets - which combine juice bars and cafes, and also sell the firm's clothing line - and via its website, the company is preparing to expand to 16 other US states and into Japan.

Now aged 46 and accustomed to travelling by private jet, he's come a long way since his days of sleeping on the streets.

In fact, Khalil's life story could be the plot of a Hollywood movie.

Born in Ohio in the US Midwest, he is the son of a Polish Jewish mother and a Muslim father.

A troubled childhood saw him leave school without any qualifications, and get arrested for vandalism and shoplifting.

In 1992, aged 21, he moved to Los Angeles with dreams of becoming a movie star.

Image copyright Sunlife Organics Image caption The business sells a range of fruit and vegetable juices

While the acting career never really took off, he started playing in local bands, and made a good living cleaning cars for Hollywood stars including Elizabeth Taylor and Jeff Bridges, and Guns N' Roses lead guitarist Slash.

However, he soon slid into drug addiction, and his life spiralled out of control. Eventually he was sleeping in cardboard boxes beside other junkies, and dealing drugs to help fund his own habit.

Then after that fateful ninth overdose Khalil's life completely changed for the better. After successfully quitting drugs he kept himself busy by juggling several jobs.

In addition to working at two rehab centres in Malibu he washed cars, walked dogs and did gardening work.

Image copyright SunLife Organics Image caption The company is due to expand to 16 other US states and into Japan

"I was able to save money," he says. "I worked hard, seven days a week, 16 hours a day."

Khalil also started to become obsessed with making his own vegetable and fruit juices after he met an old friend from Ohio.

"He was a little bit like a hippie, and started teaching me about vitamins, organic food, super food," says Khalil. "At that moment I was looking for anything that would make me feel better."

In 2007 Khalil rented a house and opened his own rehab centre, Riviera Recovery, for clients who would pay $10,000 a month to stay at the facility.

Image copyright Khalil Rafati Image caption Khalil now treats himself to travelling by private jet

For these residents, Khalil would make exotic juice blends such as one he called Wolverine - a mix of banana, maca powder, royal jelly and pollen.

Eventually the reputation of these drinks spread beyond the building, with people calling in to buy them.

Image copyright Khalil Rafati Image caption His old self was often arrested

Realising that there was enough demand to set up a separate business, in 2011 Khalil launched Sunlife Organics, together with his best friend and then-girlfriend.

Funding the business from savings, the first branch opened in Malibu. Khalil says it was an instant success, with sales of $1m in its first year.

Today the business employs more than 200 people across its six outlets. In addition to juices, it now sells a range of food and clothes, such as t-shirts and hoodies.

Rob Nazara, an analyst at Deutsche Bank in New York, says Khalil's story shows real strength of character. "No matter what the educational or professional background someone may have, the success of an entrepreneur is driven by grit, determination and ambition," he says.

Image copyright Khalil Rafati Image caption Khalil released his autobiography in 2015

Besides Sunlife Organics, Khalil still runs Riviera Recovery and owns a yoga studio in Malibu. He also made time to write his autobiography, I Forgot To Die, which was released in 2015.

"I don't consider myself super intelligent," says Khalil. "But I have a hunger for life, and put all of myself into something when I decide to do it."

Follow The Boss series editor Will Smale on Twitter @WillSmale1

Get news from the BBC in your inbox, each weekday morning