Paris Hilton and Drew Barrymore have more in common than their celebrity status.

The heiress recently paid a visit to Barrymore's brand new talk show to discuss her documentary, "This Is Paris," in which she discusses spending time in solitary confinement, which the hostess did for a time as well.

Barrymore, 45, noted that she and Hilton, 39, have known one another since childhood.

PARIS HILTON'S BOARDING SCHOOL ABUSE: FORMER CLASSMATES REVEAL NEW DETAILS, DUB STAR A 'HERO'

"I feel like, when it comes to an interviewer, maybe they haven't had the same experiences as you, so they're coming at it from more of a journalistic, interested-but-slightly-removed place. Do you find that?" the actress began, which Hilton agreed to.

"Well, not this time," continued Barrymore. "I've been where you've been. Watching your documentary, I don't know how many interviews and conversations I've going to have on this show where I'm watching a mirror image of everything I've been through as well."

Among the shared experiences between the two is having been placed in solitary confinement as young women.

In her doc, Hilton recalled being taken from her bed in the night and being shipped off to Provo Canyon School in Utah, where she allegedly suffered various forms of abuse. According to People magazine, when she refused to take unidentified pills given to her, the star would allegedly be thrown into solitary confinement for hours on end without clothing.

DREW BARRYMORE REFLECTS ON INFAMOUS DAVID LETTERMAN FLASHING INCIDENT: 'THERE IS A LINE'

While the alleged abuse took center stage in "This Is Paris," that narrative "wasn't supposed to be the original premise of the film," Hilton said, but director Alexandra Dean convinced her to share the stories in order to provide comfort and inspiration to others that went through similar traumas.

Paris Hilton revealed in her documentary 'This Is Paris' that she was allegedly abused and placed in solitary confinement while at a school in Utah. (Photo by Willy Sanjuan/Invision/AP, File)

"It was very difficult for me because it wasn't something I ever wanted to talk about in public," she admitted.

Hilton said she "tried so hard" to forget the experiences and has been left with "severe nightmares" since her teenage years due to the alleged incidents.

"I was trying to look like I had the perfect life and I was embarrassed for people to know," she recalled. "I now know that I shouldn't be ashamed, the people who work at these places who are abusing children are the ones who should be ashamed. I'm proud that even though I went through so much, I'm so strong and I could make it through anything."

PARIS HILTON SAYS 'CRUEL' AND 'PAINFUL' TREATMENT FROM SEX TAPE LEAK WOULDN'T HAPPEN TODAY WITH #METOO

Meanwhile, Barrymore, who struggled with substance abuse as a child, said that she spent "lengthy periods of time" in solitary confinement while battling addiction.

"I have to tell you, the people at my place were really good," said the "50 First Dates" star. "I mean, I didn't like being thrown in solitary confinement. I will say that I was very rebellious. I started riots there all the time and there was a lot of other kids like me, and my mom just didn't know what to do with me. I was doing drugs, I was out of control. She just threw her hands up and threw me in there, not knowing where else to turn to. And that place really did help me and it did save my life, and I actually wouldn't change a thing."

Drew Barrymore spent time in solitary confinement while battling addiction as a young star. (Photo by Michael Kovac/Getty Images for Netflix)

Hilton, on the other hand, found herself facing "trust issues" and post-traumatic stress disorder.

"I didn't deserve to go there," she said. "My mom and dad were just very strict and sheltered when I lived in LA. I wasn't allowed to go on dates, couldn't wear makeup, couldn't go to a school dance. They just didn't want me to grow up. Then I moved to New York and that's when my life changed."

At the time, she was sneaking out, clubbing and "ditching school," she said, which "really scared" her parents.

CLICK HERE TO GET THE FOX NEWS APP

These days, however, Hilton and her mother are "closer than ever" after talking about her experiences at the school.

Provo Canyon School has changed ownership since Hilton's days there. The school had told Fox News in a statement that the school originally opened in 1971, but Provo Canyon School was sold in August 2000. So school officials declined to comment on the operations or patient experience under the old owners.