Years spent working with Boston’s immigrants and homeless convinced Josefina Luna of one thing: If they were ever going to find a way out of poverty, they would have to do it themselves by working together.

In November 2013, Luna and a handful of entrepreneurs from some of the city’s poorest neighborhoods founded Cooperative Energy, Recycling and Organics, a worker-owned co-op that aimed to create green jobs by helping businesses compost to comply with a state law requiring, as of last October, grocery stores and restaurants disposing of one ton or more of food per week to divert it from landfills.

There was one problem: The co-op had no money.

“Lenders said we were too big of a risk because we hadn’t been in business three years and we didn’t have our own capital,” said Lor Holmes, CERO’s business manager. “We tried to go to nonprofit foundations, but they didn’t want to give us money either.”

So the co-op turned to a unique financing strategy, selling shares of stock in their business through a direct public offering, with a minimum goal of $100,000.

By June 10, when the DPO ended, CERO had raised more than $30,000 in donations and another $340,000 from 83 investors, whom the co-op hopes to award an annual 4 percent dividend.

“So often you hear of companies that get tax breaks to locate here, but that later leave,” said Aaron Tanaka, 32, of Roxbury, one of the investors. “A direct public offering is a way to help the community have shared ownership in a business, and when it’s paired with a worker-owned model, it’s a way of ensuring that the money stays in the community. It is a risk, but with a great social mission like composting, it’s a good investment.”

Using a 16-foot box truck, CERO picks up more than six tons of food waste per week from customers including America’s Food Basket, Northeastern University and The Daily Table, and brings it to a Middleboro composting facility.

The co-op plans to use the money raised in the DPO to buy a truck that will be able to collect more food from more customers more efficiently.

Since America’s Food Basket began turning over all of its unused food to CERO last September, the grocery chain has reduced its trash bill by about ?12 percent, General Manager Edwin Polanco said.

“We used to put everything in the trash,” Polanco said. “Now, they pick it up on time, they’re a local company, and we’re helping them grow.”

David Hammer, executive director at cooperative-adviser ICA Group in Brookline, said worker co-ops have been around for decades. Equal Exchange, a Bay State co-op and fair-trade coffee importer, recently raised $4.1 million from 136 investors.

“We see a huge need for more worker co-ops, both in Massachusetts and across the country,” Hammer said. “CERO has captured a market that is poised for growth. And they’ve put a lot of time and energy — sweat equity — into the business because they own it.”