Jennifer Aniston's performance in the small film The Good Girl seemed in 2002 to secure her a future as a serious actress.

PHOTO COURTESY OF PROVIEW ENTERTAINMENT

Even the title of the new Miguel Arteta crooked comedy of manners, The Good Girl, is contrary and mocking. Like Chuck and Buck, this director's previous collaboration with the writer Mike White, Girl is about a perverse need to create romance. Here it's like a Bette Davis melodrama: ambition and heartache with a poisonous under-current of anti-bourgeois absurdity. And it's a winner, helped along by a no-frills performance by Jennifer Aniston as the soul-sick cashier Justine.

Justine spends her dreary days at Retail Rodeo, a down-at-the-heels Texas version of stores like Target and Wal-Mart. Her co-workers include a thoughtless, proud manager (John Caroll Lynch), a bullying born-again security guard (Mr. White) and Cheryl (Zooey Deschanel), who makes sour, deadpan attacks on the inane day-to-day routine of the store's public address system.

When Justine stares into the big, droopy eyes of Holden (Jake Gyllenhaal), a new employee who wears his voluble, depressive air like the Red Badge of Courage, she's enchanted. In his early 20s and still living at home, Holden is smitten by Justine's worldliness, even though when he tells her he was named after the protagonist of The Catcher in the Rye, she asks if his name is Catcher. (It's one in a series of running riffs on the character's name that The Good Girl supplies.)

Despite this episode, The Good Girl doesn't condescend. Justine's own life is treated like that of a J.D. Salinger character. Now 30, she's mired in her job and in a marriage to Phil (John Reilly), an amiable stoner and house painter whose initiative was long ago suffocated in clouds of weed smoke. (Apparently, so was his ability to father children.) Most of the time he sits and blazes joints with his pal Bubba (Tim Blake Nelson). So when Justine begins an affair with Holden, whose pliable lower lip fills her ears with his literary pretensions to suffering, she's at first fulfilled. But eventually she becomes as much Holden's mom as she is Phil's, even though she embarked on the relationship with Holden to give her life a new charge.

It's Aniston who surprises in The Good Girl. In some ways she may feel as trapped as Justine by playing Rachel Green, the poor little rich daddy's girl of television's Friends. She comes up with an inventively morose physicality for Justine: her arms hang at her sides as though shackled; they're not limp appendages but weighed down with unhappiness. The plucky dream girls she's played in movies like the underseen 1999 classic Office Space are expressive and given to anxious displays of hand waving. But here she articulates Justine's sad tales through a narration that's as affected and misery laden as Holden's ragged, ripped-off fiction.

And for Arteta, Aniston's comic authority is a sure laugh-getter. The persuasive results are a ripe, daffy comedy about the turbulent mixture of depression and jealousy. The director and writer don't judge their characters; rather they show how difficult it is to maintain morality, and that the actions of needy people set in motion a capricious fate that damages everyone.

Arteta is more than lucky in assembling an able-bodied cast, and his comfort with actors has grown. With Chuck and his previous Star Maps, he focused more on the ideas behind the scripts; in The Good Girl, he works out the emotional life of the material. The sum total is far more satisfying and tougher to shake off.