Demi Lovato is opening up about her time in rehab.

The singer recently participated in a virtual reunion with her "Sonny with a Chance" co-stars from her days on Disney Channel.

Early on in the chat Allisyn Ashley Arm asked her co-stars what they've been up to "since the show," which ended in 2011.

DEMI LOVATO SAYS REHAB HELPED HER PREPARE FOR SELF-ISOLATION: 'I'VE ALREADY PRETTY MUCH DONE THIS'

"I went to rehab," Lovato said, laughing with her co-stars. "Several times."

Demi Lovato and Tiffany Thornton in "Sonny with a Chance."(Photo by Adam Rose/Disney Channel via Getty Images)

Demi Lovato and Tiffany Thornton in "Sonny with a Chance."(Photo by Adam Rose/Disney Channel via Getty Images)

Lovato's co-stars also praised her performances at the Super Bowl and on the Grammys, both of which served as her return to the spotlight after her near-fatal overdose in 2018.

Later in the reunion, Lovato, 27, opened up about what got her through her time in rehab, noting that co-star Tiffany Thornton was her "biggest inspiration."

"When I went away to treatment for the first time, you were my biggest inspiration coming out of it because you dealt with all of those pressures of being a woman on TV," the "Anyone" singer said.

Noting the pressures of her appearance on television, She added: "I looked at that as, 'God, I wish I had that so bad.' Yes, I probably was happier in my head with whatever I looked like at the time. But I'm so much happier now with the mentality that you have. I look back and it and I'm like, 'Man, it's a shame that we wasted any energy on what we wore on set.'"

DEMI LOVATO WEIGHS IN ON CANCEL CULTURE: 'I'VE BEEN CANCELED SO MANY TIMES'

Lovato made a return to television earlier this year, appearing in several episodes of "Will & Grace."

"I went to 'Will & Grace' this season, and I literally spent 10 minutes in the wardrobe room," recalled the pop star. "Now, I'm like... 'this doesn't matter. What I'm wearing does not matter.'"

The pressures Lovato felt as a young star led to her being overworked while she also developed an eating disorder, she said.

"I would have people over for meetings on my lunch breaks, because that's how much I worked. People would come in and I'd be covered in a blanket and people would say, 'Why is it 80 degrees in here?' I would be like, 'Because I'm freezing.' They would be like, 'Oh my god, what's wrong with you?'" Lovato remembered. "I had an eating disorder and I was underweight and freezing."

"I'm realizing that as I've gotten older... when you start off in the industry as a 7-year-old, 8-year-old, you kind of value your self-worth with your success," said Lovato.

Despite her success, the singer said she occasionally wonders what her life could be like if she stepped out of the spotlight like Thornton, 34, whose final acting role was in 2015.

CLICK HERE TO GET THE FOX NEWS APP

"I have moments all the time where I'm like, 'Do I want to continue this?'" Lovato admitted. "Or do I want to pull a Tiffany and move to Texas, have a family and have a farm?"