Massachusetts officials say we’re on a path to zero waste, and it starts with what’s on your plate. Food waste is the single largest component of our trash and a major source of greenhouse gas emissions. A recently enacted food waste ban is forcing large institutions to find alternatives to throwing away food.

A sweet, heavy smell lingers inside Stop and Shop’s Green Energy Facility in Freetown, MA. The source: more than a dozen waist-high cardboard crates full of aging food that couldn’t be sold or donated. Stop and Shop spokesperson Phillip Tracey pulls out a container of browning lettuce and an organic juice drink past its use-by date.

“It’s all types of food," he says. "It’s not just vegetables, but you see cheese here, you see vegetable juice, sandwiches, donuts, you name it."

Each day, trucks leave Stop and Shop’s regional distribution center next door carrying food to stores around New England. Not all of it goes home with a customer. The grocery chain donates almost 13 million dollars worth of unsold products to local food banks annually. But there’s always more food that can’t be sold or donated - a lot more. Now, that unusable food makes the return trip to Freetown.

"Everything you see here multiplied times 95 tons a day would most likely have ended up in a landfill," explains Tracey. "Now, it’s being turned into energy."

Until recently, food and other organic waste like this made up a quarter of our trash. Massachusetts officials want to cut that in half by 2020. So, they’ve enacted a law that prohibits throwing away more than a ton of food each week.

That leaves large institutions with two main options - composting or something called anaerobic digestion. While composting is sometimes compared to recycling for food, anaerobic digestion is the food equivalent of waste-to-energy. Microbes break down food in the absence of air and produce bio-gas that can be burned to make electricity. That’s what Stop and Shop chose.

"Stop and Shop’s goal is to be landfill-free by 2020, and we’re eighty eight percent of the way there," says Tracey. "This is just the icing on the cake for us. It’s one of our crowning achievements. There’s only one other facility like this in the United States.”

One of the things that makes this digester unique is the fact that it can handle packaged food. There are no people here ripping open bags or emptying bottle s. Instead, that job goes to specially designed machines.

Outside, a two-story-tall metal tank shines in the sun. Inside, microbes are sucking up that food waste milkshake and spewing out methane gas.

"So, this is the 1.2 million gallon reactor, the actual digester. The biogas is rising to the top, and we’re pulling a vacuum on it and collecting that gas. That’s then going into our generator - an internal combustion engine - where we’re burning the biogas."

There are eleven anaerobic digesters in Massachusetts producing electricity. About half of those - including Stop and Shop - use the energy on-site, while the other half earn credit for the electricity they feed into the grid. But the economics remain a challenge for would-be digesters.

“What we’ve seen is it working more at the larger scales - you know, wastewater treatment plant size and up, or a farm that has at least 250 or three hundred cows and up," says Amy Barad, who oversees the organics-to-energy program at Massachusetts Clean Energy Center. "It has been challenging to make it work at smaller scales."

Plans to build a small digester at the Bourne Transfer Station fell through earlier this year when Eversource declined to buy the power.

Mashpee Transfer Station is going a different direction. They now accept residential food waste and hand it over to a commercial composter. It ends up in the back field of a Christmas tree farm in West Falmouth, where Mary Ryther set up Compost With Me two years ago."

What you’re looking at here are the cylinders of wire fencing that we use for dumping the commercial compost into," says Ryther, pointing to eight or nine piles, each about the same size as one of Stop and Shop's food waste crates. "These kind of represent maybe half a week at this point. We fill up maybe two of those per week. And in the summer months we might fill up one a day."

Ryther left a career in architecture to start Compost With Me. When she was getting started, she turned to industry experts for training, but found the classes weren’t really geared for her.

"I first went to something called the Rot Star Boot Camp. And that was the first official training I had," says Ryther. "More recently, the US composting council had a compost facility operators training course. And, again, that course was aimed at large scale facility operators. So they sort of laughed at me a bit - nicely, in a nice way - and called me a boutique composter."

Ryther is one of two commercial composters on the Cape. The other, Sandwich-based Watts Family Farms, works primarily with grocery stores on Cape Cod and the South Shore. Compost With Me collects food waste from about thirty residential customers, and just over a dozen restaurants and schools on the Upper Cape.

"So what we do is we dump it off the truck," explains Ryther. "We put it into the wire, and then add the brown materials, which are the leaves, horse manure, wood chips, and cardboard."

For composting to work, nitrogen-rich "greens" like food have to be mixed with carbon-rich "browns” like leaves and manure. Ryther gets paid to take food waste, but accepts browns free of charge. She has three part-time employees and pays a bobcat operator to come in and turn the piles so they get the air they need.

"The smelly days are the ones when you turn it, so we like to do it early in the morning, before the wind kicks up. We make sure there’s not a wedding going on," says Ryther with a laugh.

Compost with Me is something of an experiment. We know composting works biologically, the question is – can a small operator make a living at it.

"Working on that," says Ryther. "I think so, as long as an operator can make money from the collection of the food scrap materials, process it at a fairly low cost, and then sell the product at the end."

Both composting and anaerobic digestion keep uneaten food out of landfills and turn it into something useful. And there may even be a silver lining to the economic challenges they face. Institutions often find their best option is simply to reduce the amount of food they need to dispose of in the first place. Even simple changes can cut waste in half. And that’s critical if we’re going to get to zero waste.