JC1 / WENN 1 / 6

"Look into my eyes, Sofia Vergara. You will not eat sweets, you will not eat cake."

While those words may not be exactly what she'll be hearing, the "Modern Family" actress said she's actually giving hypnosis some thought to cure her love affair with sweets, candy and cake.

RELATED: Beauties of every age

"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," she said in the recent issue of Shape Magazine. "When I do indulge, I exercise a bit harder the next day. My workout motto is really simple: No pain, no cake!"

Her sweet tooth aside, Sofia still manages to maintain her curvy figure, mainly through Pilates-inspired physical fitness, one of the only workouts she finds tolerable, but not lovable. Her Lagree Method workouts rely heavily on a Megaformer, a machine that has a system of springs and pulleys that can be adjusted to increase or decrease resistance.

RELATED: Sofia's best mermaid looks

"With this machine, I was able to figure out what worked for me," she said. "I don't love it at all, but I love how my body's changing."

"Everyone knows that I've never been into working out. I was always very happy with what I have," she told the magazine. "Then I hit 40 and I started seeing a softness everywhere on my body."

RELATED: 15 reasons why we love Joe and Sofia as a couple

Should the 42-year-old need any advice, she needs to look no further than her Statue of David-esque boyfriend, Joe Manganiello. We have our doubts that he suffers from the same cake obsession, though.

Just last week on "Live With Kelly & Michael," she sang the praises of her favorite pastry. Whether it's in her home or on the set of her TV show, Sofia is never far from it. She even goes so far as to travel with it!

"I'm addicted to cake," she said. "It makes me happy. If I'm sad, I eat cake. If I'm happy, I eat cake."