OVER most of the past decade, the European Union has been in a sorry state. Countries such as Greece and the newest member, Croatia, are basket-cases. Ordinary voters have lost trust in the EU: at the recent European elections barely two-fifths of them bothered to cast a ballot and almost a third of those who did backed anti-European or populist parties. Instead of devising a convincing response, European leaders will spend this week’s summit bickering over whether Jean-Claude Juncker, an uninspiring old-school federalist from Luxembourg, is the right person to run the European Commission. Yet one big country defies the general gloom: Poland, the subject of our special report this week. Once considered the problem child of central Europe, Poland has seen its economy grow since the collapse of communism by more than any other in the EU. It was the only EU member to avoid a recession during the financial crisis. And it has managed to have more cordial relations than ever before with its two big neighbours (and former occupiers), Germany and Russia—or it did at least until Russia annexed Crimea earlier this year. It is hard to think of any country in Europe, rich or poor, that can’t learn something from Poland.

From periphery to core

How did Poland do so much better than central Europe’s stars—the Czech Republic, for instance, with its deep industrial roots? Unlike most of its ex-communist neighbours, which opted for a softer transition to capitalism, Poland embarked on “shock therapy” in 1990, masterminded by Leszek Balcerowicz, then finance minister. Almost overnight price controls went, markets were fully opened to foreign trade, the zloty was made convertible, subsidies to state-owned industries were slashed and privatisation began. This was painful for nearly everyone, but after a short, sharp slump in which GDP shrank by almost 15%, growth resumed in 1992—and it has not stopped since.

The biggest single contribution to Poland’s success, however, was its effective use of EU membership. The Poles were quick to see the opportunities in the EU’s structural and cohesion funds as well as the benefits of improving their own governance and transparency. Poland fought harder than Romania, Bulgaria and its Visegrad peers against corruption, especially in public procurement, and has a decent record of using structural funds as a result. The EU has rewarded Poland’s probity by making it the biggest recipient of its funds (a whopping €102 billion, or $139 billion) between 2007 and 2013. The country will once again get the biggest chunk (€106 billion) in the next multi-year budget from 2014 to 2020.

However, Poland’s third lesson is the one that matters most: the job is never done. Poland has kept pushing ahead with reforms, in a way that Germany has not, let alone France. And there is still more work to do, such as slimming the bloated public sector, raising corporate and private saving and investment, and persuading more bright Poles to stay at home rather than emigrate. Poland will avoid the “middle-income trap” only if it can develop higher-tech industries and services.

Over the past seven years the Civic Platform government has done well at combating complacency. But now it is stuck in a nasty scandal, based on tape recordings of boozy conversations between leading politicians. In one, Radek Sikorski, the foreign minister, calls the Polish-American alliance “worthless” and mocks Britain’s prime minister. The government seems likely to tough the scandal out. But even if Polish ministers lose their jobs, Mr Juncker and Europe’s timid leaders should not miss the main point. If they had run their countries half as well as Poland, Europe would not be in such a mess.