LOS ANGELES  Ricky Gervais says he decided to make an 80-minute finale to his HBO series “Extras” because he had a few things left to say about the wages of fame, and the people who pay them.

“Shame on you” is one of the printable expressions that Andy Millman, the pompous sit-com star portrayed by Mr. Gervais, lobs toward the network executives who put “freak show” reality series like “Celebrity Big Brother” on television.

But he doesn’t reserve his vitriol just for the programmers. He sprays bile toward the audience who watches the train-wreck television and the celebrities who feed the beast, having weddings sponsored by tabloid magazines and calling their publicists before they call taxis to go to rehab.

“I’ve always sort of deconstructed telly a little bit,” Mr. Gervais said in a telephone interview from New York this week, where he recently finished shooting his first starring role in a feature film, “Ghost Town.” “I’ve also been in my ‘study of fame’ years. ‘The Office’ was sort of my life’s work, where I downloaded everything I knew about the minutiae of behavior from working in a normal job. The last few years, I’ve been in the media, in the middle of fame. They say, ‘Write about what you know.’”