For writer Mike White and director Miguel Arteta, “The Good Girl” is a follow-up to their first collaboration, the dark, oddly moving “Chuck and Buck” (2000), but the order of the films might easily have been reversed. “These were both passion projects for [Mike] that he had to write, that he’d been thinking about for years,” Arteta noted during a recent Dallas interview. “And he finished both scripts about four years ago, and he showed me both scripts. And I actually wanted to do ‘The Good Girl’ first, but he wouldn’t let me have it….So we were at a standstill for about a year–neither movie got made as we were fighting over this. He wanted to direct ‘The Good Girl,’ so he was holding onto it. I loved ‘Chuck and Buck’ too, so we went ahead and made that and had a great experience.” So great, in fact, that White eventually relented and turned “The Good Girl” over to Arteta, too. “Finally I wore him down,” the director said with a laugh.

The new film is an ensemble comedy-drama about an interconnected group of characters in a small Texas town, all centered around Justine (Jennifer Aniston), who’s stuck in an unhappy marriage with a housepainter named Phil (John C. Reilly) and a dead-end job at a discount store called Retail Rodeo, where she’s surrounded by a bunch of peculiar co-workers; unbeknownst to her, she’s also an object of desire to Phil’s long-time partner Bubba (Tim Blake Nelson). The whole arrangement of personalities shifts with the arrival at the Rodeo of a new clerk, the shy, troubled Tom Worther (Jake Gyllenhaal), who calls himself Holden after the protagonist of his favorite book, “The Catcher in the Rye,” and aims to become a writer despite his serious psychological problems. Justine grows strangely attached to him, imaging him the poetically dangerous alternative she’s been seeking, and their affair brings trouble to everyone. The question is how “good” a “girl” Justine will decide to be, and how she’ll resolve what’s developed into a romantic triangle. “I love movies about damaged characters,” Arteta mused. “I especially love movies about characters whom life has not given the tools to help themselves. I think it such a compassionate, embarrassing, funny and emotional thing to watch a character like that try to figure out how to deal with life. That’s why I like all of Mike White’s damaged characters. We call them damaged goods.”

The script, Arteta observed, “is loosely inspired by ‘Madame Bovary,’ kind of Emma Bovary in modern culture. And when you think of it in those terms, it seems to capture the feeling of a longing to escape that you get from people who are feeling trapped. I think the story is very universal, because everybody feels that they want to escape; no matter what their circumstances, everybody thinks there’s a better place. It’s a really comedic spin on some of the things that ‘American Beauty’ was touching upon. We have wealth in this country, but we’re really unhappy. But we tried to make it funny–we tried to sort of have our cake and eat it, too.” He elaborated on the characters of Justine and Holden: “It’s not only important to have a dream, but you have to think about what the content of that dream is. There’s something about American movies–the idea of having a dream is always glorified, and in many ways it doesn’t matter what the dream is, as long as you have a dream. [But] if you have a silly dream, you’re going to ruin your life.”

Arteta drew another comparison. “The Retail Rodeo really represents, like, a jail,” he explained. “The whole movie works like a prison escape film. The Retail Rodeo is like a jail, and the warden is giving announcements, and you have the inmate who’s very religious and survives that way, and the two inmates who decide they’re going to escape together….We used the conventions of a prison film to make the Retail Rodeo work…[as] as good metaphor.”

The director enthused over the actors he’d been able to assemble for “The Good Girl,” calling it “a dream cast. This might be the best cast, as a whole, that I’ll ever work with. It’s very nice when you feel the eight leads are great–all of them are great.” He mentioned how difficult it had been to secure Gyllenhaal, who had only three weeks between productions in his schedule but said he’d go from one set to the next in order to do the picture (during his audition, Arteta said, “he was amazing–he picked up a chair and smashed it into a wall; he wasn’t showing off, he was just into it”), and recalled that Reilly’s ability to convey so much without dialogue led them to cut some of his lines (“He’s such a good actor you get it all without him saying anything”). But Arteta reserved most of his praise for Aniston, who anchors the picture and is on-screen almost constantly.

“She’d been doing the TV show for seven years and she really wanted to kind of break out of that role and try something different,” he recalled. “She was very scared, but she was very game. She got the script and called right away the next day and was like, ‘I’ve read the script, it’s fabulous, I love it. Are you sure you’ve got the right address? I mean, you want me?'” After all, Justine was a dowdy, sullen character, a role that wouldn’t lead fans of “Friends” to think instantly of Aniston. But Arteta remembered her performance as a Texas waitress in Mike Judge’s little-seen “Office Space,” and replied: “‘Having seen that, I think you can do anything.’ When I met with her a few days later, she said, ‘I’ve been waiting for my “Ordinary People.”‘ I told her I’m not as good-looking as Robert Redford, but I’ll do what I can.”

Aniston proved a complete trooper. When a Texan interviewer remarked on how authentic her accent as Justine sounded, Arteta said he’d have to report that to her: “She worked on it so intensely–she had a dialect coach for two months.” And the short shooting schedule–only 33 days, plus one day of reshoots–demanded a great deal of her, especially during the initial three weeks, when she was also working on the TV series. “She worked every day, every moment,” Arteta said. “It was really exhausting for her. She was doing two days on ‘Friends’ and five days of sixteen or seventeen hours a day on our film. So she was working seven days a week for the first half of the shoot. It worked for her character because she was exhausted and fed up. She was like, ‘I’m so tired and I’m getting so depressed!’ And I’m like, ‘Yes!'” Aniston’s inherent likableness was also helpful to the story, he noted. When asked whether he thought Justine was really a “good girl,” Areta replied: “I think not. But I think that she’s so likable and approachable that you don’t question all the morally ambiguous things that she does. She’s so sympathetic, you almost understand when she makes bad choices.”

Toward the close of the interview, Areta was asked whether he’d like to direct a big Hollywood production. “You’re asking whether I want to be a studio slut?” he quipped. He then admitted that he’d like to try something more elaborate, and thought he could work within the system. He went on to quote his friend, writer-director Michael Lehmann: “‘When you make a studio movie, you’re a guest in their house.’ I’d want to be an interesting guest at their home. I don’t want to be an unmemorable guest, but I don’t want to tear the walls down.” But Arteta quickly added: “My heart will always be with lower-budgeted film….I love independent film. To me it has been like free therapy. Every movie [I’ve made] has been about something that I really need to work on. And it’s humbling and frightening and exciting to get into it.”

Miguel Arteta’s “The Good Girl” is a Fox Searchlight release.