John Wells discussed the impact of the pandemic and police protests on Sunday’s series finale.This interview includes spoilers for Sunday’s series finale of “Shameless.”Before he created “Shameless,” the long-running family drama that ended Sunday night on Showtime, John Wells was the showrunner of “ER” and later seasons of “The West Wing,” both on NBC.Though the shows are superficially dissimilar, Wells sees all of them as examinations of function — or dysfunction. “ER” is about how medicine works. “The West Wing” is about how government works. And “Shameless”?“That’s about how the system doesn’t really work for families living near the poverty line,” Wells said. “Man, talk about that being underrepresented on television! That is a huge portion of our society that we don’t tell nearly enough stories about.”Over 11 seasons, “Shameless” conveyed the outrageous and topical stories of the Gallaghers, a sprawling family with largely absent addict parents Frank and Monica (played by William H. Macy and Chloe Webb), leaving the daughter Fiona (Emmy Rossum) to raise her younger siblings Lip (Jeremy Allen White), Ian (Cameron Monaghan), Debbie (Emma Kenney), Carl (Ethan Cutkosky) and Liam (Christian Isaiah).Based on a British TV series, the Showtime version transferred the scruffy family to the South Side of Chicago and, among other things, thoroughly modernized the British concept of “kitchen-sink drama.” The Gallagher kitchen hosted such events as Monica slicing her wrists, Fiona having impromptu sex, Debbie giving birth, Frank removing Debbie’s necrotic toes and then-toddler Liam collapsing from a cocaine overdose.“Comedy can be brutal,” Wells said. “It can reach past our reluctance of being preached to.”“Shameless,” he added, is “a show about a family trying to survive and laughing their way through it.”Wells would have been happy to continue relating the Gallaghers’ misadventures — while addressing weighty topical issues like inequality, gentrification, addiction, mental illness and sexuality — for “another 20 years.” But Showtime gave the show a final season just before the coronavirus pandemic. Then three days before shooting began, in which the mostly grown-up Gallaghers finally disperse, production was shut down for months.During the unexpected time off, Wells rethought the season and decided to incorporate the pandemic, using Frank, who was long past his sell-by date for various medical reasons, as the poster boy for anti-maskers. In Sunday’s series finale, Frank died of Covid.“We weren’t trying to do a ‘Very Special Episode,’” Wells said. “Even in comedies that are satirical, there should be real consequences.”In a phone interview from Victoria, British Columbia, where he’s working on a new series for Netflix, Wells discussed the inspiration for Frank’s death, Fiona’s near-return and the legacy of “Shameless.” These are edited excerpts from the conversation.“Frank has so many possible comorbidities,” Wells said. “Covid is just the thing that finally pushed him over the edge.”Paul Sarkis/ShowtimeYou rewrote the entire season after the shutdown. Was Frank destined to die all along? How did you decide he would get Covid? There have been plenty of Covid-19 subplots on TV but I can’t think of another lead character who actually died from it.We didn’t want Frank to get off scot-free for all his lifestyle choices. We were always planning for him to pass away from something at the end. Originally, we were thinking he would take his own life in an overdose. What the hell — why not go out in a blaze of glory?Then I lost a close family member from Covid at Christmastime. That’s happening to lots of families. So I thought, “We should make a comment on that.” We tried to make a comment all season on the particular difficulties that the pandemic has presented in low-income communities, and still make it kind of funny. To have Frank die of something else in the midst of this pandemic, it would be a little too easy. Frank has so many possible comorbidities — Covid is just the thing that finally pushed him over the edge. There’s certainly some schadenfreude in this, Frank always thinking he can skate by everything and coming to a moment he couldn’t skate by.In his delirium, Frank mistakes a health care worker for Fiona, which is the first time that she has been mentioned since Emmy Rossum left the show two years ago. Why haven’t the Gallaghers talked about their sister? The house is in Fiona’s name, and she remains Liam’s legal guardian.We had written in various mentions of Fiona over the last two years, but Showtime asked us not to remind people of her absence. I think they were very concerned that Emmy’s absence would significantly hurt the viewership of the show.We very much wanted to try and bring back Fiona for the finale, but there was just no way to make it all work with the pandemic. I’m sure Emmy would have come back and done it, and it would have been nice to see her again. But she had some health concerns about returning, quarantining and trying to be safe. It’s hard to question anybody’s choices based on travel and safety.There was going to be a family discussion about who was going to take care of Frank. In the early ideas of the story, that was a perfect way to have Fiona return. We had some humorous versions of it, where they all got sick of Frank, put him in a box and sent him down to Florida. And then Fiona opened the box! Best laid plans.Did Showtime ever veto any other ideas or voice other concerns?It was kind of our inside joke: “You can do about anything, but you can’t steal a library book.” I think that was because [Showtime co-president of entertainment] Gary Levine didn’t want to encourage people to actually keep library books. [Laughs.] Showtime expressed concern about various things that then they ultimately supported, like Frank sending Carl to cancer camp. The idea was that every kid should be able to go to camp.In the early days, we had a lot of conversations about Frank choosing to sleep with Lip’s girlfriend Karen (Laura Slade Wiggins). Then we came up with the solution of how Frank would seek forgiveness, how Lip would urinate on Frank’s head and Frank would actually accept it, because he realized he deserved it. It was always about the balance of what’s been done and what we leave unpunished and unforgiven in the family, because the show is really just about how a family can pull itself through all different kinds of crisis.In its final season, “Shameless” sought to reflect the losses many families have experienced during the pandemic.Paul Sarkis/ShowtimeWas there ever a story that you wished you had contextualized more?Carl’s story line, becoming a cop. We could have used two more seasons to explore that. We had a lot of conversations with Showtime about how much we could say. It was a fine line, trying to ride an ongoing conversation in the country.How much did the Black Lives Matter protests and the ongoing national conversation about racial inequality influence what you had originally planned?Carl’s story line became far more topical. Not that these issues weren’t always there, but they became front and center after a number of horrific incidents of police brutality. What is proper policing? Is the purpose of the police to protect the well-off from the not-well-off? There are certainly many people who believe that. That’s an oversimplification, but we all need to understand what those fears of the police are, the lack of trust that exists in a lot of communities.We were also trying to address things about lack of housing. One thing I wish we had another year to explore was the eviction moratorium expiring, when we discover just how many people have lost their jobs and live with food insecurity. I’d love to be talking about pandemic checks, and what a huge difference affordable day care would make to Debbie and Tami (Kate Miner). We’d find the humor in these stories but these are life-and-death issues for families who live on the margin.Why do you think “Shameless” wasn’t part of a larger cultural conversation, particularly during awards seasons?I never want to complain about it, because I’ve been on the good side of that equation. But I would say that when you’re doing stories about people who are less fortunate, if you’re not providing easy answers, the shows tend to get overlooked a bit more. I don’t have any explanation for why “The Wire” was never the most decorated show in television history. We want to pretend that the country is egalitarian, that it’s a meritocracy, that everybody has the same opportunities, and it’s just not true. That’s hard for us to accept. It challenges our sense of who we are. What are our responsibilities to each other?There was some backlash. Critics did not latch onto the show at the beginning. Many people wanted to write off “Shameless” as a sex comedy. And that’s OK. We had a great, loyal audience for a long time. People would stop me on the street and tell me that Frank was like their dad. Kids would come to our Chicago set, and tell us about how they were thrown out of their homes for being gay, lesbian or trans. People would tell us how their big sister raised them, or how they reconnected with older siblings because of the show. We all search for community, and the Gallagher world was a community of kids who cared about each other.What would you want to see in a “Shameless” spinoff?I want to see the Alibi cop-bar story, and what happens with Carl and Arthur (Joshua Malina) as police officers. I love Kevin (Steve Howey) and Veronica (Shanola Hampton), and would love to see what happens to them. Lip was on the verge of actually figuring things out and succeeding. We have a massive legion of fans for Ian and Mickey (Noel Fisher), so seeing where their life goes. For many people, they represent different ideas of who gay men can be and how those relationships can be.We did what we set out to do. Hopefully people enjoyed it, saw some of their own hardships in it, or have a little more empathy for the tens of millions of people in America who live at the poverty level that the Gallaghers lived at in the show. Tip your waiter a little bit more. Leave some extra money for the maid when you stay at a hotel or motel. Be a little more understanding with the person who delivers your package. Try and walk in other people’s shoes.Having all these stories out there reminds people that the things that they might be ashamed of and feel need to be hidden, nah — we’ve got to talk about it. More