In To the Bone, Lily Collins plays Ellen, a 20-year-old illustrator whose battle with anorexia has brought her to the brink of death. Collins, petite even by Hollywood standards, had to lose serious weight in order to play Ellen. It’s the sort of role that someone who once suffered from an eating disorder, as Collins did, might shy away from. But she embraced the complicated challenge in a healthy way. “[The producers and director] were all female and they were very motherly,” she says. “We worked with a nutritionist, and [the weight loss] was done in a specific, calming, loving way.”

Collins read the script for the film—based on director Marti Noxon’s own struggle with the disorder—in the midst of writing Unfiltered, a book of personal essays. She had just finished a chapter on her eating disorder. “It was like the universe throwing it at me, saying, ‘I think this is something important for you to go through.’” Having overcome her issues, Collins is able to bring a sense of hope to the role. “I had all of the stages there to give to Ellen,” she says. “She doesn’t know how to reach them yet.”

From the very beginning of the film, there’s a steely strength to Ellen. The same can’t be said for other characters at the group home where Ellen is admitted. That’s the reality of addiction: many addicts never recover, but the hope is that movies like this can help. “I would have loved to have seen something like [To the Bone] when I first started having my problems,” says Collins. In the end, Collins lived with the character for the month it took to complete the film. “It was a really long month,” she says. “But how awesome to face a fear head-on like that?”

To the Bone will be released worldwide on Netflix July 14.