At first glance, she looked as if she might be a store employee. But no. The young woman was looking through the day’s trash for her next meal. Already, she had found a dozen aging potatoes she deemed edible and loaded them onto a luggage cart parked nearby.

“When you don’t have enough money,” she said, declining to give her name, “this is what there is.”

The woman, 33, said that she had once worked at the post office but that her unemployment benefits had run out and she was living now on 400 euros a month, about $520. She was squatting with some friends in a building that still had water and electricity, while collecting “a little of everything” from the garbage after stores closed and the streets were dark and quiet.

Such survival tactics are becoming increasingly commonplace here, with an unemployment rate over 50 percent among young people and more and more households having adults without jobs. So pervasive is the problem of scavenging that one Spanish city has resorted to installing locks on supermarket trash bins as a public health precaution.

A report this year by a Catholic charity, Caritas, said that it had fed nearly one million hungry Spaniards in 2010, more than twice as many as in 2007. That number rose again in 2011 by 65,000.

As Spain tries desperately to meet its budget targets, it has been forced to embark on the same path as Greece, introducing one austerity measure after another, cutting jobs, salaries, pensions and benefits, even as the economy continues to shrink.

Most recently, the government raised the value-added tax three percentage points, to 21 percent, on most goods, and two percentage points on many food items, making life just that much harder for those on the edge. Little relief is in sight as the country’s regional governments, facing their own budget crisis, are chipping away at a range of previously free services, including school lunches for low-income families.

For a growing number, the food in garbage bins helps make ends meet.

At the huge wholesale fruit and vegetable market on the outskirts of this city recently, workers bustled, loading crates onto trucks. But in virtually every bay, there were men and women furtively collecting items that had rolled into the gutter.

“It’s against the dignity of these people to have to look for food in this manner,” said Eduardo Berloso, an official in Girona, the city that padlocked its supermarket trash bins.

Mr. Berloso proposed the measure last month after hearing from social workers and seeing for himself one evening “the humiliating gesture of a mother with children looking around before digging into the bins.”

The Caritas report also found that 22 percent of Spanish households were living in poverty and that about 600,000 had no income whatsoever. All these numbers are expected to continue to get worse in the coming months.

About a third of those seeking help, the Caritas report said, had never used a food pantry or a soup kitchen before the economic crisis hit. For many of them, the need to ask for help is deeply embarrassing. In some cases, families go to food pantries in neighboring towns so their friends and acquaintances will not see them.