A Brooklyn couple who collected thousands of dollars for a cancer-stricken 5-year-old at Long Island businesses and city police and fire stations, but kept the money, admitted to the scam Thursday.

Brittney Schmidt, 31, and Vincent Fina, 30, pleaded guilty in a Mineola court to a felony charge of scheme to defraud.

Authorities said the flimflam included the pair telling some people their donations would go toward the child’s funeral, before they used some of the money on drugs.

The couple swindled victims by using the story and photo of a boy named Gianni from Staten Island who had brain cancer, but was alive, according to prosecutors. They said the two found his story on an online crowdsourcing page and the child had no connection to them.

The couple left court without commenting after their pleas.

Acting State Supreme Court Justice Robert Bogle said he’d sentence them in November to 5 years’ probation, 60 hours of community service and any treatment programs that probation officials order.

advertisement | advertise on newsday

Bogle said during Fina’s guilty plea he believed the community service element was an important part of the punishment.

“Hopefully, you’ll be working for a substantive charity. . . . You understand that?” the judge asked.

“Yes,” Fina replied.

Fina’s attorney, Ronald Bekoff, told the judge his client already had been through inpatient drug treatment and was continuing on an outpatient basis. The married couple had been using drugs and “were desperate,” the Garden City attorney said after court.

“Now they’re taking steps to cure it,” Bekoff added.

Schmidt’s attorney, Martha Leventhal of Nassau’s Legal Aid Society, declined to comment after court.

Prosecutors have said Lynbrook police arrested the pair in March after they went into several businesses with their 11-year-old son and asked for donations.

Authorities later added more criminal charges after the investigation continued. As part of their guilty pleas, the couple admitted to soliciting donations in at least 10 businesses in Lynbrook, Baldwin and elsewhere in Nassau, along with businesses, police precincts and fire stations in Brooklyn and Queens.

“The good people of Nassau County gave generously when these defendants conned them with a pitch for a fake cancer charity,” Nassau County District Attorney Madeline Singas said in a prepared statement. “This disposition ensures that they will receive the drug treatment that they need and provide service to the community to make amends.”