Updated

Sofia Vergara loves her sweets as much as she does looking fabulous – but most of the time those two don’t go hand-in-hand.

The Colombian bombshell revealed in the November issue of Shape magazine, which hits newsstands Thursday, that she has considered hypnosis to find a cure.

“I heard about someone in L.A. who got hypnotized so they wouldn’t eat candy. I’m seriously looking into that because I’m obsessed,” Vergara said.

Although she has yet to visit a hypnotist, the “Modern Family” star has changed her attitude about working out – especially after hitting a certain milestone birthday. Vergara said she was also inspired by co-star Julie Bowen, who is an avid runner.

“I hit 40 and I started seeing a softness everywhere on my body … I knew it was time to do something, so I did,” she said, though she will find any excuse to not actually work out. “I’ll say, ‘Sunday? No, it’s the Lord’s day; I can’t work out.”

That doesn’t mean Vergara skips out on her work out. She revealed she uses a Pilates-like machine called the Megaformer with adjustable springs and pulleys – because her “bad knees” prevent her from jogging.

“With this machine, I was able to figure out what worked for me,” the 42-year-old said. “I don’t love it at all, but I love how my body’s changing.”

The actress said that she has also changed her mentality about food.

“If you live here (in Los Angeles), you can’t always order the high-fat dishes like pasta with truffles,” Vergara said. “You have a little sushi, and when you’re out with your girlfriends you order a nice salad.”

She said she has a goal in mind when she eats healthy and works out: it gives her a chance to freely eat the sweets she loves.

“When I do indulge, I exercise a bit harder the next day,” she said. “My workout motto is really simple: No pain, no cake!”

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino