“Free sneakers, shoes and boots today,” Bernard Rorie shouted, standing outside a soup kitchen in East New York, Brooklyn, where he was being recorded by investigators

Mr. Rorie was recruiting homeless people, prosecutors said, and whoever had a valid Medicaid card would be packed into a van and sent to medical clinics around New York City. There, after hours of unnecessary tests and fake diagnoses, the homeless people would be sent off with sneakers — selected from stacks of shoeboxes in the clinics’ basements. The doctors, staff members and billing specialists, meanwhile, would rack up hundreds or thousands of dollars per recruit in false Medicaid claims, prosecutors said.

On Tuesday, nine New York doctors were among 23 people indicted in State Supreme Court in Brooklyn in connection with the sneaker scheme, which the Brooklyn district attorney’s office said made almost $7 million and took advantage of thousands of homeless people.

The charges in the indictment include health fraud, enterprise corruption and money laundering.

“At the heart of this health care fraud scheme was the exploitation of poor people,” Kenneth P. Thompson, the Brooklyn district attorney, said on Tuesday. “This was a Medicaid mill.”