Lily Collins never thought she'd be posing in a swimsuit on the cover of a major magazine.
The 28-year-old actress did just that for the July issue of Shape magazine, exclaiming, "I never dreamed I’d be posing in a bikini on the cover of Shape. It’s a complete 180 for me. It’s a magazine about what it means to be healthy."
Collins is currently living a balanced lifestyle that includes diet and exercise, but opens up about her past struggles with an eating disorder. "My perspective on other people’s view of me was based on this disorder being a secret. But the more open I became about it, the more I was able to be myself," she shares. "I did consider that talking about my struggles with an eating disorder would overshadow my accomplishments as an actor, but I also knew this was something I needed to do to move forward as a human and an actress. I needed to let go."
WATCH: Lily Collins Pens Letter of Forgiveness for Dad Phil Collins -- 'We Can't Rewrite the Past'
She adds, "Having suffered from an eating disorder doesn’t define me; I’m not ashamed of my past."
Collins is playing a woman with an eating disorder in Netflix's To the Bone, which premiered earlier this year, and says the part served as "a new form of recovery" for her. "Although I was in recovery for several years before the movie, preparing for the film allowed me to gather facts about eating disorders from professionals," she notes. "I had to remind myself that they hired me to tell a story, not to be a certain weight. In the end it was a gift to be able to step back into shoes I had once worn but from a more mature place."
MORE: Lily Collins Shows Off Insanely Toned Abs and New Funky 'Do
The Mirror Mirror star also shares her diet and exercise regimen, which includes "farm-to-table" dining and "the occasional dessert."
"To be honest, I try to be active in some way every day. It’s my time to disappear and be in my own world. I can also push myself past what I thought I was capable of," Collins says of her workouts. "I used to feel guilty if I skipped a workout in the past, but now it just means life is offering up things that I want to do instead. Those ellipticals will always be there but experiences won't."
MORE: Lily Collins on How Her Parents Influence Her Romantic Relationships -- I'm 'Attracted to Mysterious Creatives'
In an exclusive interview with ET, Collins talked in greater detail about playing a woman with an eating disorder in To the Bone, following her own experiences with the disease. “It was an entire physical experience, emotional experience,” she said. “But I was supported, and it's a really important story to tell.”