A pair of House committees yesterday moved to provide federal food and shelter assistance to Americans in need.

The Labor and Education Committee approved a bill that would require the secretary of agriculture to release millions of dollars' worth of surplus federal food to states for distribution to the poor.

The Banking Committee voted out a measure that provides $760 million for government loans to bail out the unemployed and others who face loss of houses through foreclosure. It also contains $100 million to help states and localities provide shelter for the homeless.

The two bills are part of a growing number that are working their way through both houses of Congress aimed at relieving some of the suffering caused by the recession.

The surplus food bill has enjoyed wide bipartisan support since it would not only help feed the poor but also would help cut what its sponsor, Mario Biaggi (D.N.Y.), called the "exorbitant" amount it costs the government to store the commodities. The committee vote was 27 to 2.

Committee staffers had no estimate of the amount of food involved. There is more than $5 billion now in surplus, but some is committed to the armed services, foreign aid and other programs. The bill would require the government to pay 5 cents a pound for processing and distribution of the food.

A similar bill, sponsored by Sen. Robert J. Dole (R-Kan.), was approved by the Senate Agriculture Committee last week. Dole said that under his plan more than $1 billion worth of food would be available.

The Banking Committee's foreclosure relief measure, which is strongly opposed by Republicans and the Reagan administration, is designed to provide temporary aid to homeowners who, through no fault of their own such as being laid off, suffer loss of income.

The measure requires the secretary of housing and urban development to evaluate applicants for assistance to determine if they meet the bill's criteria. Under its terms, the homeowner must, among other things, have suffered an "involuntary" loss or reduction of income. But there must be a "reasonable prospect" that he will be able to resume payments within three years.

If the homeowner meets these requirements, HUD will pay a lender whatever is necessary to make the loan current and make payments for the borrower for up to three years. The homeowner pays whatever he can, up to 38 percent of his income after such expenses as taxes, insurance and utilities.

The HUD payments become, in effect, a second mortgage which the homeowner is expected to pay off when he is back on his feet.