But the popular coffeehouse became ground zero for a different kind of "fix" when Dr. Alvin Yee started practicing pain management at Starbucks locations throughout Orange County in California. It was his dream of being self-employed that, he said, led him to Starbucks.

"It is pretty much the American dream to be your own boss," Yee told ABC News' Deborah Roberts. "Unfortunately, it's the dream that turned into a nightmare."

That nightmare began in 2010, when Yee started examining patients at Starbucks. He said that he would pull out his stethoscope and listen to patients' hearts, lungs, evaluating all vital signs. Sometimes, he said, he even performed neurological exams.

Los Angeles DEA

Dr. Alvin Yee meets with a DEA agent posing as a patient on November 10, 2010. The agent left with prescriptions for 60 Oxycontin, 60 Xanax and 120 Roxicodone.

To finance the eventual overhead of a solo practice, Yee started a side business seeing patients for pain management.

But with nowhere to treat those patients, he resorted to Starbucks, the modern day office for the office-less. There, he'd treat a dozen or so appointment-only patients at night, he said.

When asked if he had a special arrangement with Starbucks or even paid rent, Yee responded that he did not. He justified his unusual actions by saying, "There are plenty of lawyers and…other professionals that meet and do business there, and they don't pay rent either."

But Yee wasn't just poaching on private property. He was doling out prescriptions for the most powerful and addictive painkillers, such as OxyContin. Some patients would leave the coffee shop with as much as a three-month supply of narcotics. In exchange for the drugs, patients would hand over fists full of cash: as much as $600 for an initial visit and $300 for follow-up visits.

Yee said he put systems in place to weed out so called "professional patients" or junkies. He said he hoped that his high fees would eliminate the criminally-minded. But the patients kept coming, one-third of them in their 20s. Some even asked for Adderall and Xanax. One of those eager patients was Derek Rosas, who was coping with an old lacrosse injury.

His mother Tammy Rosas said she'd find numerous empty bottles of OxyContin, prescribed by Yee, in her son's car. She didn't understand why he routinely required such strong pain medication. Her son's addiction would soon prove deadly. While Yee was never charged in Derek Rosas' death, Tammy Rosas nonetheless said she holds him partially responsible.

By September 2010, Yee was the unsuspecting target of a federal investigation. Drug Enforcement Administration (DEA) agents believed Yee, motivated by greed, was selling prescriptions for powerful controlled substances.

Stunning undercover video, which will air for the first time nationally on "20/20" on Friday Nov. 8, revealed the results of the DEA's elaborate eight-month sting operation. Yee was seen in the footage often being flippant, more friend than physician, to undercover agents who posed as patients. With a wink and nod, he was seen writing a prescription for OxyContin and Xanax for an agent who told him her friend was unable to keep her appointment. Yee was also heard telling the agent to keep the illegal transaction between the two of them.

Yee was also seen prescribing painkillers to another undercover agent who admitted being a former heroin addict. When the "patient" told Yee she had been borrowing painkillers from a friend, Yee replied, "You won't be having to bum off of your friends anymore."

Yee admitted to "20/20" that he was wrong to prescribe painkillers for an absentee patient. When asked why he would prescribe painkillers to someone with a history of heroin addiction, the doctor defended his actions saying, "There are some people that, if they're not able to get access to their…pain meds that they…result to other ways of treating it, and sometimes it's heroin, so that's one way I rationalized it."

By September 2011, Yee had relocated his practice out of Starbucks and into his own office space in Irvine, Calif. But it was too little, too late. The DEA had already seen enough. Convinced that Yee was no more than a common drug dealer, the DEA arrested and charged him with 56 counts of prescribing controlled substances without a legitimate medical purpose.

Dr. Yee's ex-wife, Lila Allen, told "20/20" she stands by Yee, saying, "he's so far from being a criminal it's not even funny."

She refutes comparisons to Yee as a drug dealer, saying her former husband was too trusting of patients, even "gullible", but not a criminal motivated by money.

"I blame him for being-- using poor judgment," Allen said. "I blame him for being naive. ... I still support him ... I know that he had good intentions."

Allen said she would never be with a drug dealer because the loss of her own son who died of a drug overdose, and who was the same age of Tammy Rosas' son Derek.

Just weeks ago, facing trial and possibly life in jail, Yee pleaded guilty to seven counts. A judge sentenced him to 11 years in a federal prison.

"I'll take responsibility for… lapses in judgment," Yee told "20/20."

"You know…everybody makes mistakes, but I never really felt that through all the people that I did help that I would end up completely losing everything most dear to me."

In response to this 20/20 report Starbucks sent along the following statement:

"Starbucks top priority is to provide a safe and enjoyable experience for our customers and partners (employees). We do not tolerate illegal activity of any kind in our stores and are pleased that law enforcement put an end to the illegal activity featured in 20/20's story last Friday."