The star wants to help other women battling cancer now she's successfully conquered her own health troubles.

Actress Cobie Smulders has credited a topless magazine photoshoot in 2015 with helping her accept and appreciate her body again after beating cancer.

The Avengers star stripped off for Women's Health magazine last year (15) and used the accompanying interview to go public with her secret battle with ovarian cancer.

In the article, Cobie revealed she had been diagnosed in 2007, when she was just 25, and battled the disease while working on hit TV comedy How I Met Your Mother.

Now, in a candid essay for Lena Dunham's Lenny Letter email service, Cobie has opened up about the nerves she initially struggled with during the semi-nude shoot, and how it changed the way she felt about her figure.

"It was a very strange day," she begins. "I was standing in front of a camera lens in my underwear and holding my breasts, all while trying to appear not sexy but confident, not flirtatious but gleamingly positive.

"It all made me start thinking about this body that I'm in. And what it has been through. And suddenly this bizarre invitation became an opportunity to share some insight from my experience of being diagnosed with, receiving treatment for, and eventually learning to cure my cancer."

Cobie, now 34, admits the health scare came as a real shock because she was suddenly faced with the possibility of never being able to conceive naturally.

She continues, "Just when your ovaries should be brimming with youthful follicles, cancerous cells overtook mine, threatening to end my fertility and potentially my life. My fertility hadn't even crossed my mind at this point. Again: I was 25... Now I was being told it was most likely not a possibility to create my own children. It felt grossly unfair."

The actress adopted a really healthy diet and worked on the fitness of her body and mind as she prepared to undergo surgery, and after conquering cancer, she and her comedian/actor husband Taran Killam were able to start a family, welcoming daughter Shaelyn in 2009, and their second child, another girl, born last year (15).

"Thankfully, gratefully, cancer did not get the best of me," she shares. "The best of me now lives on in my two little women, baby girls I was lucky enough to be able to make with my own body."

Now her health nightmare is firmly in her past, Cobie wants to help others facing similar struggles by using her voice to raise awareness about the disease.

"So now that I'm on the other side of this, I feel like it is my duty, even if it means posing topless, to spread awareness," she explains. "Since my article in Women's Health came out, I have had so many conversations with women about their own battles with cancer, and it feels so empowering to open up this dialogue and learn from each other."