HARLEM — A group of former inmates are using fresh vegetables to stay out of jail.

Every Saturday from July to November, young men who have been in and out of the criminal justice system run a fresh produce stand at Grassroots Famer’s Market on 145th Street and Edgecombe Avenue.

“Overall, the program is great,” said Alex Rosario, 30, the manager of Fortune Fresh stand. “Being out here working definitely keeps you out of trouble.”

The stand is run by Fortune Society — a nonprofit that offers education and career services to ex-inmates — and receives funding from Capital One bank.

When it started in 2012, the program had two participants and was open for six weeks. This year they have seven workers and will be open for five months, said Kristen Pederson, manager of Food Services and Nutrition for Fortune.

Rosario used to walk up and down the stands of Yankee Stadium selling hot dogs, Cracker Jack and nachos. His experience in customer service is why Pederson picked him to manage the stand.

Throughout the day Rosario talks with customers in both English and Spanish about the produce they are selling and where it came from. The stand has only been open for a month but he has already developed a good relationship with some of the regulars.

“They don’t get a lot of fresh food around here,” he said.

The rest of the staff comes from Fortune’s pre-GED class — which is now the pre-High School Equivalency class. Only the students with the best attendance records are considered to work in the stand. Those that qualify go through an interview process and then receive customer service training from Capital One, Pederson said.

The entire staff, including Rosario, have been in trouble with the law. Some of them were referred to the program by their probation officers, Pederson added.

The seven staffers are paid $10 an hour. Some, like Prince Crusoe, are saving that money to continue their education.

If Crusoe, 20, passes the High School Equivalency test next month, he plans to enroll in an auto mechanic working program and Co-op Tech.

“I like working on Mustangs, Corvettes, Range Rovers,” he said. “I don’t like working on a Prius.”

He started a similar program about a year ago but had to put it on hold when he was incarcerated, he said. Like Rosario, Crusoe said working at the stand and staying active is a good way to avoid trouble. It’s something that is a lot easier said than done.

“You see a lot of people get stagnant,” Rosario said.