Cobie Smulders, best known for her role as Robin on "How I Met Your Mother," appears on the cover of the current issue of Women's Health, USAToday reports.

The photo of Smulders features the actress topless and she looks happy and in great shape.

According to her interview in the magazine, Smulders explains that she had a battle with cancer when she was 25, during the third season of "How I Met Your Mother."

Smulders' reveal of her ovarian cancer was something she had kept from the public until now. 

"I had tumors on both ovaries," she says, "and the cancer had spread into my lymph nodes and surrounding tissues." 

To get rid of the cancerous tissue, Smulders had to undergo several surgeries over the course of two years. 

"I don't think I'll ever feel like I'm cancer-free," she says. "Now that I'm five years out, I'm trying to think of it as a positive thing and what can I learn from it. And if I can create more awareness, I'll do it." 

Smulders says she wants to maintain a healthy lifestyle.

"I always associate 'healthy' with 'healthy eating.' I'm big into 'you are what you eat' and if you're taking care of yourself in that respect, then you're going to feel good. Look good, feel good." 

Smulders said she was not trying to be sexy by appearing topless for the magazine cover. 

"It was my first topless photo shoot where I wasn't trying to appear 'sexy', which was interesting," she said in the magazine. "Because it's a women's magazine, I feel like being topless is more about being confident and about being happy with your body rather than trying to excite somebody else. That's what this cover was more about." 

The picture, according to Women's Health, was taken just two months after she gave birth. 

Smulders now appears in the "Avengers" franchise as S.H.I.E.L.D. Agent Maria Hill. Next for Smulders is appearing in the upcoming "Avengers: Age of Ultron," coming out in May.