(Reuters) -- Spain's economy shrank further in the second quarter but looks set to stabilize over the rest of the year while the government continues to push structural reforms and budget austerity, Economy Minister Luis de Guindos said on Sunday.

European leaders on Friday agreed to allow the euro zone rescue fund to inject aid directly into problematic banks, bypassing the sovereign government, and intervene on debt markets to support Treasuries facing high funding costs.

The accord was trumpeted by European newspapers as a triumph for Spain and Italy, under siege by nervous investors, and as a defeat for German Chancellor Angela Merkel, who has resisted using common euro funds to support troubled economies.

Merkel has argued euro zone members must be responsible for turning around their own economies and warned easing aid terms could prompt European politicians to ease off on unpopular reform measures and spending cuts.

Everyone has come away from this important summit a winner. It is the euro which has won. From now on, we must all contribute, de Guindos said during an event at conservative think tank FAES.

The Spanish government is committed to austerity, with a difficult budget correction, and economic reforms which are essential for growth ... it's a process which must continue.

Spanish GDP shrank by 0.3 percent quarter on quarter in the first three months of the year.

The government expects the economy to contract by 1.7 percent year on year in 2012 but many analysts have warned deep austerity measures could make the slump worse.

The conservatives, who inherited from the outgoing Socialists one of the euro zone's highest public deficits, at 8.9 percent of GDP in 2011, have said they will shrink the shortfall to 5.3 percent this year and 3 percent in 2013.

Since taking office in December, Prime Minister Mariano Rajoy has announced budget savings worth almost 5 percent of GDP for this year and passed a labor market reform and reforms for the banking sector, badly hit by a burst property bubble.

Spain has applied for up to 100 billion euros ($126.91 billion) to recapitalize some of its debt-laden banks, a credit line which is likely to come before the direct recapitalization rules, agreed at the summit, are put in place, further weighing on its deficit. ($1 = 0.7880 euros)

(Reporting by Nigel Davies; Writing by Paul Day; editing by Jason Neely)