Sara Shepard remembers vividly how much she hated living in Pennsylvania back when she was a teenager going to high school in Downingtown.

"I felt like this area was so stifling. I just wanted out," she says. "I thought I would never come back here. I really hated the suburbs."

Today, as she sits in the manicured yard outside her house in bucolic Chester County, she finds it more than a little bizarre that the time and place of her greatest discontent should provide her with a healthy living.

Shepard is the author of the best-selling series of young-adult thrillers Pretty Little Liars, about a group of girls tormented by a terrible secret they share.

The books, set in the apocryphal Main Line town of Rosewood, are steeped in local color. It's a pampered world of Volvos and backyard pools, of field hockey skirts and season tickets to Phillies' games. But beneath that affluent veneer . . . .

The eighth and final book in the series, Wanted, will be published Tuesday, the same day the TV program Pretty Little Liars debuts on ABC Family Channel (8 p.m.). One reviewer described the show as "Gossip Girl Meets I Know What You Did Last Summer."

Shepard, 33, is the beneficiary of the oft-repeated creative suggestion, variously attributed to William Faulkner and Mark Twain: Write what you know.

After graduating from New York University and obtaining an M.F.A. from Brooklyn College, she spent several years moonlighting as a ghostwriter for Alloy Entertainment, the showbiz packager responsible for the popular Clique and Gossip Girl series. Shepard was relegated to lesser-known titles such as Samurai Girl.

Then, Alloy encouraged her to develop her own more personalized premise.

"What do I know really well?" she asks. "Well, I know suburban, kind of Main Line Philadelphia.

"Together, we came up with the very small idea of, 'What would it be like for four girls if their best friend goes missing and returns - or so they think - three years later and starts text messaging them?' "

Shepard, who had been writing stories steadily since she was in grade school, began doing research to reenter the teen mind-set.

"I definitely watched a lot of MTV," she says. "The Hills and Laguna Beach. I also kept journals in high school. I still have them and I'm glad I kept them. I sometimes read entries like, 'Why doesn't he like me?' That's always fun, to know how I would have dealt with an issue at that age."

Her own experiences from that period were still quite accessible.

"I was a kind of a punk-rock kid. Very moody. And I wrote a lot," she says, laughing.

Karen Mapes, her AP English teacher at Downingtown West High School, has a somewhat different recollection, filing this report card by e-mail:

"Without question, I remember Sara's capacity to create challenging, cogent and creative responses to the studies presented. Her work showcased her intellectual, probing mind and her distinctive ability to interpret the literature with humor and her unique writer's voice. Sara wielded a pen with panache, passion and perception."

Upon securing the Pretty Little Liars book deal, Shepard quit her day job in Manhattan. She spent a summer in West Chester with her husband, Joel Wilkens, a Paoli native, reimmersing herself in local ambience.

"It's been a lot of fun to mention Wawa, all those covered bridges, and the trails I used to run on," she says. "The little college town [of Rosewood] is a mix between Bryn Mawr and Haverford."

One of the benefits of working in the young-adult genre is its devoted readership.

"The fans are so great. They're so enthusiastic," she says. "They read so carefully and they get so excited about the books coming out. They write to you and if you write back, they're like, 'I can't believe you wrote back to me!!!!' It's so sweet."

After years of these characters existing only in her imagination, it's jolting for Shepard to see them turning up in flesh and blood on the TV screen.

Pretty Little Liars features a fresh-faced young cast and a well-known adult contingent, including Chad Lowe, Holly Marie Combs, and Nia Peeples.

"They sent me the pilot and I laughed watching it because they stuck very close to the book," she says.

"We stayed true to the characters, the mystery, and the town. It's all on the Main Line near Philadelphia," says Marlene King, executive producer of the show, which shoots in Vancouver.

But some fine-tuning was done. "The only thing we changed was the socioeconomic status of the girls," says King. "We wanted them to be less affluent so they'd be more relatable. No more private school."

After a few years of living in Tucson, Ariz., where her next book series, The Lying Game, is set, Shepard moved back to the Philly burbs in 2008.

What was a hellhole to a sensitive teen looks pretty good from an adult perspective.

"When I came back, I said, 'This is really pretty out here. Why did I hate it?' " she says. "It's nice to come to terms with all that stuff from adolescence. I don't have any issues anymore."

Take that, Thomas Wolfe!