The revolving door between Fox News and Republican political figures has turned steadily for years, with failed GOP candidates finding a home at the network.

But since Donald Trump was elected president, the door has provided a number of former Fox personnel with entree into a government now infused with the cable channel’s fiery sensibility. And with Bill Shine’s appointment this summer to a top job in the White House, the door may finally come to rest.

The two worlds have merged into one universe: the Fox News White House. If Donald Trump is running his own touch-and-go reality show from Pennsylvania Avenue, he has finally found in Shine his executive producer.

“Bill has spent decades on the other side of the camera. This allows for a deep-breath frame of reference sometimes lost in the din and churn of nonstop ‘news,’ ” Kellyanne Conway, counselor to the president, said in an email. Shine’s “role in building the most-watched cable news channel — amid early ridicule and relentless, yet hopeless, critics — equips him for the rigors of a fast-moving White House and an even faster-moving president.”

For 20 years, Shine worked under Roger Ailes — a mercurial, headstrong, conspiratorial, and punishing boss with a trail of sexual harassment allegations. And now he’s working for another, Trump.

Ailes was the longtime CEO and co-founder of Fox News, the most successful cable news operation in history and easily the most disciplined and controlling of its staff and their message, until he resigned in July 2016 following allegations of sexual harassment and retaliation against his staff. (Ailes denied any wrongdoing and died in May 2017.)

Shine was his No. 2, known as the Ailes enforcer. As the White House’s deputy chief of staff for communications, he has been given a broad mandate to create a cohesive message for an administration in which the president’s whims and missives often make such unity impossible. And with Trump stepping up his campaigning ahead of the Nov. 6 midterm elections, message discipline is all the more crucial for the president and his party.

The challenge is formidable. Trump is known, among other things, as the most unmanageable president in modern American history. But Trump is also obsessed with his own image, and Shine has an eye for television optics.

“Shine learned from Roger Ailes that two things get media attention: pictures and problems,” said a senior White House official. “He looks at things visually, which is how Trump sees things.”

Both fans and critics of Shine see a symmetry between his old job and his new one. At Fox News, “he was kind of running the thing, but he had someone bigger to serve,” said Sean Spicer, Trump’s former White House press secretary. What Shine did for Ailes, Spicer added, is “kind of what he’s doing now.”

Nancy Erika Smith, who represented several women in lawsuits against Ailes and Fox News alleging sexual harassment, expressed a similar sentiment about his ­appointment, but for different reasons.

“Neither Ailes nor the president seem to care at all about sexual harassment,” she said. “His bosses are so similar, [Shine is] perfect for the job.”

Shine himself was not accused of sexual harassment or misconduct in any of the Fox News lawsuits, though some of the women alleged that he was dismissive when they raised concerns about Ailes. Shine, who declined to be interviewed for this story, has repeatedly said he had no knowledge of Ailes’s sexual misconduct.

Others at Fox have good things to say about Shine. “He was always honorable in all my dealings with him,” said Greta van Susteren, who hosted her own show at Fox for years and worked extensively with Shine.

Still, Shine’s loyalty to Ailes ended up being a liability, and their close relationship made Shine vulnerable after Ailes was forced out. Shine became co-president of Fox News but only for nine months before he resigned under pressure. He seemed uncomfortable with elements of his role as a leader without Ailes to serve, according to one close associate of Rupert Murdoch, founder and executive chairman of News Corp and 21st Century Fox.

Shine, 55, sports a closely cropped white beard that camouflages a facial scar he picked up in college and carries himself with the assured gruffness familiar in Trump's orbit. He began his television career working as a producer for local stations on New York's Long Island. His big break came in 1996, when Ailes hired him as a producer at the newly formed Fox News Channel to work on the prime-time show, "Hannity and Colmes," which pitted conservative Sean Hannity against liberal Alan Colmes.

Shine’s relationship with Hannity was a key to his rise at Fox and his move to Washington. After Shine’s ouster from Fox News, Hannity advocated that Trump hire his friend, according to two people familiar with the ­discussions.

In response to questions about his advocacy for Shine, Hannity, through a Fox News spokesman, wrote, “This is just more fake news.” Trump also spoke to Murdoch about Shine, who recommended him to the president, according to a person familiar with the exchange.

But the allegations that surfaced at Fox risked putting Shine in some legal peril.

After his appointment, the New York Times reported that last year Shine was subpoenaed in the Southern District of New York’s criminal investigation into the misuse of funds at Fox News. The investigation is focused on whether Ailes misused company funds to settle with and silence women whom he had sexually harassed, according to two people familiar with the investigation. According to one of these people, investigators are interested in whether Shine covered for Ailes.

After the Times story ran, Trump expressed concern about Shine’s personal exposure to the investigation. Murdoch again called the president, with whom he is in regular contact, to assuage his worries, according to two people familiar with the call.

When Shine moved to Washington earlier this summer, his wife, Darla, helped him get set up. But they are not giving up their Long Island home, so he has spent hours on his own in his new place, putting together furniture, meeting the cable guy and generally settling in.

Shine’s relocation efforts have become something of a running joke in the West Wing. One night, as he was preparing to leave the White House, someone asked if he needed to borrow a hammer. Recently, he sent a group text to his communications team with a photo of his newly assembled vacuum cleaner.

Shine’s former Fox colleagues also described him as a kind of everyman, who for 20 years commuted two hours by train from Long Island to the network’s Midtown Manhattan studios.

His colleagues in the White House, most of whom worked their way to Washington after hustling on political campaigns, have been quick to credit Shine’s background in television news as bringing a fresh perspective. Some staffers say Shine is Trump’s Michael Deaver, who as deputy White House chief of staff orchestrated some of the iconic moments of Ronald Reagan’s presidency, and they joke admiringly that he is the “lighting guy” because of his eye for production details.

A case in point was Shine’s focus, as first reported by Axios and confirmed by White House officials, on the staging of Trump’s prime-time reveal of Brett Kavanaugh as his Supreme Court nominee in the gold-draped and chandeliered East Room.

Trump had long been frustrated that the lighting quality of White House events looks cheap compared with the shows he watches on television. Finally, he had an aide who knew how to fix it. Shine presented him three lighting options, the president picked his favorite, and Shine then dutifully toyed with the podium position, microphone height and backdrop until he achieved what Trump felt was the perfect camera angle.

“Bill Shine has made an entire career of subordinating himself to a big personality, to a boss at the tippy top,” a Shine confidante said. “So when they’re in the East Room, he wants the lighting to look the best it possibly can so that Trump can look the best he possibly can.”

Sometimes Shine gets credit where it isn’t fully due. He helped stage an F-35 fighter jet on the South Lawn for the White House’s Made in America product showcase last month — the kind of big-and-bold move Trump loves — though a senior White House official said the use of the jet had been in the works before Shine arrived on the job.

So far, Shine has trodden lightly in the West Wing. He has been on a listening tour of sorts, meeting with colleagues to build relationships and to better understand everyone’s duties. Shine’s allies say his decades working with competing personalities and egos at Fox News were good preparation for Trump’s West Wing.

“The guy’s been managing talent for 30 years,” deputy White House press secretary Hogan Gidley said. “He understands when he needs to assert. He understands when he needs to listen, and he understands when he needs to offer opinions. And he’s still the new guy. He’s wise enough to understand that he won’t have all the answers right off the top.”

In a White House where some staffers compete for airtime to ­impress their television-addicted boss, Shine has made clear he has zero interest in being on camera and would rather work behind the scenes than build a personal brand.

But Shine quickly discovered that it is difficult to remain anonymous when working in the Trump White House. In his first few days on the job, Mediaite surfaced racially charged comments posted to his wife Darla’s Twitter account, including one that read: “If white chicks can’t perm their hair — black chicks can’t go blonde.” The account has been deleted. A former television producer, Darla Shine wrote “Happy Housewives,” a 10-step guidebook for stay-at-home moms, in 2005.

In the White House, Shine is poised to make big changes, according to colleagues — some of whom requested anonymity to be able to speak candidly. He is considering adjustments to the daily press briefings and is beginning to recruit staffers to join the communications team, which has been depleted by recent departures.

“Bill is a strong leader who brings a lot of insight and expertise — he’s a great asset to the president and the rest of the team,” White House press secretary Sarah Huckabee Sanders said in an email. “As I’ve gotten to know Bill more over the last month it’s clear he is someone who loves his family and his country and is totally committed to fighting for the president’s agenda.”

The Shine-Sanders relationship is being closely watched internally, though officials said that they are getting along well and that he is content to have her continue as the administration’s public face.

“He views Sarah as reliable, trustworthy, hard-working and someone who has the president’s best interests at heart,” said the Shine confidante. “There is not going to be any effort to push Sarah out. But when the time comes and Sarah is ready to exit on her timeline, he will be very actively involved in trying to put somebody in that job that is a top-shelf talent.”

So far, Shine’s biggest focus has been on his boss. Before coming to the White House, he was getting secondhand intel from his friend Hannity about the internal West Wing dynamics, according to a senior White House official. Now, Shine is asking friends for advice about the most effective way to push back on some of the president’s ideas, according to the associate, who added that Shine’s approach was not to talk Trump out of doing things, but rather how to best accomplish his end objective.

Former Fox colleagues say Shine excelled at deflecting confrontation, both with Ailes and with others at the network. “He had an uncanny way to tell you what you didn’t want to hear,” said Eric Bolling, a former Fox personality who counts Shine as one of his closest friends. “He didn’t actually make you feel bad or mad about it.”

In his first few weeks at the White House, Shine has told people he wants to "lower the temperature" on the toxic relationship between the press and the president. But so far his actions seem to have been counterproductive.

One of Shine’s first moves in his new role involved blocking CNN White House correspondent Kaitlan Collins from attending an open-press Rose Garden event after she asked Trump a string of questions earlier that day during his meeting with European Commission President Jean-Claude Juncker.

After reporters were ushered from the Oval Office, Juncker asked Trump about the shouted questions, which embarrassed the president, according to White House officials. Afterward, Collins described being ushered into Shine’s office, where Shine and Sanders informed her that she would not be allowed to attend the event that afternoon. The move drew widespread condemnation from press outlets, including Shine’s former employer, Fox, as well as the White House Correspondents’ Association.

When asked by reporters about the decision to “ban” Collins, Shine shot back in Fox News-ian wordplay that showed his proclivity for deflection. “When you ask her if we ever used the word ‘ban,’ then I will answer your question,” he told reporters.

This was a classic Shine move.

“The president said he wanted to do something, and Bill did it,” said one Shine confidant.

“He couldn’t care less what Kaitlan Collins or the press think of him,” said another. “He’s working for one guy.”