When the Inter-faith Housing Alliance of Ambler received a $5,000 grant for a community garden, its executive director, Laura Wall Starke, thought the flower beds outside the group's transition residence for homeless families would be the perfect location. The families would be able to walk right out the door to pick.

But Fred Beddall of Pennypack Farm in Horsham delivered the bad news after an inspection: "Are you crazy?" Electrical wires and big tree roots were embedded in the soil, the flower beds were narrow, and there was too much shade.

Starke realized she had money for a garden and no place to plant. Meanwhile, a few miles away, members of a Maple Glen synagogue were planning to turn a plot on their 14-acre campus into the fulfillment of a religious mandate.

Seven months later, the housing group and the synagogue have joined together to complete their respective missions. Congregation Beth Or planted an organic garden that supplies vegetables to the alliance community's families in need.

The partnership provides squash, zucchini, cucumbers, peppers, and corn to Hope Gardens, an apartment residence for homeless families in Ambler, and to a food cupboard sponsored by the housing group at Holy Trinity Evangelical Lutheran Church in Abington.

"It's awesome, because I learn to make better meals for my kids without having to worry about the cost of it," said Kathy Pelusi, 27, a resident of Hope Gardens who says she rushes to get the pick of the harvest on delivery days.

Starke herself picks up about 40 pounds of vegetables from the garden every week and delivers them to the transition home and the food cupboard.

The garden is providing fresh produce during a national economic downturn that is putting added strain on food cupboards. Donations have declined at a time when more people are asking for help, according to Philabundance, a hunger-relief agency.

In 2009, the Holy Trinity food cupboard distributed 5,000 bags of food to 1,007 families, up from 3,500 bags to 825 families in 2008.

The synagogue started the garden as a mitzvah (good deed) that fulfills the principle of Tikkun Olam (repairing the world). The 33-by-33-foot plot is called the Corner of the Land Garden, based on passages in Leviticus about reserving portions of the land and the harvest for others.

"The land is not there for us to draw sustenance for our own benefit," said Rabbi Gregory Marx, the synagogue's senior rabbi. "We are stewards of land that belongs to God and we are to share everything."

For about 20 years, the synagogue has worked with the alliance through the Inter-faith Hospitality Network of Ambler, a group of 19 congregations that provides housing and meals for homeless families on a monthly rotation.

At Hope Gardens, the alliance offers job counseling, therapy sessions, and educational programs for eight families. And in recent years, it has sponsored the 40-year-old food cupboard at Holy Trinity.

"People are having to chose between food and rent or food and medicine," Starke said. "Our numbers have leveled off some, but it's still higher" than before the downturn.

In Ambler, food shopping is complicated by the fact that the borough's lone supermarket has closed and there is none within walking distance, Starke said.

"Fresh produce was rare, so I thought a garden would be perfect," Starke said. "And we could do some education. A lot of people don't know where their food comes from - and certainly our children don't."

Starke and Marx were chatting at a meeting of the Wissahickon Faith Community Association when they realized their planned gardening projects could expand their relationship.

The synagogue, which moved to its Maple Glen campus in 2006, has a thriving social-action program.

Members Mitch Diamond and Bruce Dorsey, who garden at home, were tapped to lead the synagogue's effort. They planted in May and about 24 members from ages 4 to 85 have worked the garden, donating soil, building a fence and gate, tilling, and harvesting. The alliance's $5,000 grant from Prudential is used to help operate the garden, which has withstood regular visits from hungry deer.

The project evokes the "spiritual wow" of growing your own food and being connected to nature, said Dorsey, a chemist.

On July 22, a crew from the synagogue picked squash and hot peppers from the garden and placed them in a pickup basket.

Four days later, clients at the food cupboard carried the very same vegetables from the church to their kitchen tables.

Contact staff writer Kristin E. Holmes at 610-313-8211 or kholmes@phillynews.com.