Riverside Church’s outgoing female pastor is set to receive an exit package worth at least half a million dollars — after leaving her job amid allegations she bought an employee an unwanted $200 vibrator while on a work trip, The Post has learned.

The Rev. Dr. Amy Butler — who made $250,000 a year as the first woman to lead the historic congregation — will leave with 12 months’ salary, a six-month housing allowance worth $48,000 and annual retirement contributions of $59,000 for three years, according to her contract.

An email sent by the chair of the church council and seen by The Post says Butler will also get a $100,000 “separation payment”– which would take her golden handshake to a total of $594,530, when including her unused vacation payout and the $10,000 tab for her lawyer’s fees.

According to the emails, the church council voted to approve the agreement — although one employee raised concerns about the large sum blowing out the house of worship’s operating budget, which covers payroll.

Riverside Church has until July 31 to pay Butler the money she is owed from the five-year contract, which expired on June 30.

The church and Butler did not respond to requests for comment — with the pastor taking a vow of silence on Friday when asked about the sex toy shopping spree scandal.

On Thursday, The Post revealed the 49-year-old exited her job amid complaints she brought two assistant ministers and a congregant on a sex toy shopping spree in Minneapolis then gave one of them an unwanted vibrator as a gift.

One of the ministers filed a formal harassment claim days later, prompting the church attorney to hire a third-party investigator, who interviewed both ministers and substantiated the claims, sources said.

Both parties realized Butler’s position had became untenable after the Minneapolis complaint and they mutually parted ways, a source familiar with the negotiations said.

The two sides were “far apart on negotiations” — even before the vibrator incident — as Butler had hired a lawyer to help her try to score a $100,000-a-year raise, a source said.

But supporters of Butler told the New York Times she was let go because she spoke up against sexism and harassment — and her persistence ultimately fractured her relationship with lay leadership.

Butler — known as “Pastor Amy” — was hired in 2014 as the seventh senior minister of the Morningside Heights church and was the first woman to lead the congregation known as a bastion of inter-denominational liberalism and civil rights.

On May 15, the pastor allegedly took two assistant ministers and a female congregant to Minneapolis sex store Smitten Kitten during a religious conference, according to sources familiar with the out-of-town shopping excursion.

At the store, Butler bought a $200 bunny-shaped vibrator called a Beaded Rabbit for one minister — a single mom of two who was celebrating her birthday — as well as toys for the congregant and herself, sources said.

The minister didn’t want the sex toy, but accepted it because she was scared not to and feared professional retaliation, sources said.