The operators of the popular site face a 1 million kronor ($150,000) fine if they fail to stop the practices, the court ruled.
After conducting research into the Stardoll virtual world, the Swedish Consumer Agency (Konsumentverket) took the company, which has 100 million users worldwide with about 250,000 members in Sweden, to the Swedish Market Court (Marknadsdomstolen).
In a verdict handed down on Thursday, the court upheld much of the Consumer Agency's critique.
Stardoll has responded that the verdict could spell the end for its services on the Swedish market.
"This ruling has wide-reaching implications not only for us but for the entire gaming industry," Stardoll CEO Mattias Miksche told the TT news agency.
"They are telling us we cannot send direct messages to the players' inboxes, which they say is the equivalent of sending offers and deals to people's homes."
In its complaint against Stardoll, Sweden's Consumer Ombudsman (Konsumentsombudsmannen, KO) said its marketing was "aggressive".
To prove its point, the Consumer Agency signed up to the site with its own avatar, called Liza, and kept a log of how she received marketing offers.
""Liza" had to fill in a parent's email address to join the community, because she was underage, but the agency said that in communicating with the parent, Stardoll made no reference to future marketing.
"Only if the parent feels there is reason to distrust the letter sent to them and they read the user agreement will they see that Stardoll will send marketing to the child and that the child can buy things on the site," the complaint read.
After "Liza" indicated what she would like her avatar to look like, the site played up a video where she was told she could upgrade to "superstar" for 30 kronor.
The video implies, according to the Agency's interpretation, that a girl who does not sign up would remain the dour, plain girl portrayed at the beginning of the clip.
It is possible to opt out and keep playing as a normal player, the agency noted, but from thereon after, Liza's life in the virtual community was plagued by booby trap after booby trap.
For example, the agency pointed out, Stardoll enticed "Liza" with gifts but when she went to open them, she was told to upgrade her membership.
When "Liza" finally fired off an SMS to get more credit on the site, she received the following response: "Be a Superstar for even longer. Buy additional weeks now!”"
Story continues below…
The verdict left the Stardoll CEO befuddled.
"It says it's ok to sell thing but still we cannot have a button on our site that says 'buy' or 'upgrade'," Miksche told TT.
"I don't really know what we'll do now."