It is understandable that David Cameron and his Conservative colleagues are aghast at the £1.7 billion bill Britain now faces as a result of a recalculation of what member countries are due to pay the European Union.

The revelation that the strength of the UK economy has been undervalued and therefore our contributions to the EU budget have been less than they should have been is catastrophically timed for the prime minister.

Mr Cameron is currently trying to defend his government's and his party's position against the onslaught from EU critics Ukip, by renegotiating issues about immigration and rewriting the terms of Britain's EU membership. With another by-election looming, giving more money to Brussels is the last thing he needed.

However, it is wrong to characterise this bill as a punishment for economic success, as some Tory backbenchers have tried to do. The recalculation is a regular adjustment, and in this case is based on new information becoming available about elements of the UK economy, including for the first time the black economy.

It is the size of this demand and its timing that is so inflammatory. But Britain is likely to find few friends in objecting to it, even among countries such as the Netherlands which are also facing unexpected bills.

We are the only country with a rebate and many European nations already feel we are not paying our way. So Mr Cameron is likely to have to pay up. We should accept this and be more accepting of Europe's other rules too.

Mr Cameron wants to renegotiate the UK's terms of membership, and rewrite the rules about the free movement of workers - which were fundamental to the establishment of the European project.

Regardless of his success in this, he has promised an in-out referendum by 2017, if the Conservatives are re-elected.

This is profoundly dangerous. Among all the talk of risks attached to a Yes vote in the independence referendum, this was one of the greatest risk which came with Scotland voting No.

Both north and south of the border, taking Britain out of Europe would do huge damage to domestic trade with the EU. Half of Britain's exports are sold to Europe and the EU has helped maintain peace across the region.

The influence Britain has within the EU is often underplayed, but outside of it we would have none.

Yet the recalcitrant attitude of the UK over the years has left us with few friends. Britain is seen as being interested only in trade and not in greater cooperation over taxation, social policy, human rights and justice.

We cannot proceed in Europe by objecting to everything from environmental policy to the choice of president. There are undoubtedly failings in the European project, and Mr Cameron certainly faces a daunting task in steering a course to satisfy the Euro-sceptics within his party and without it.

But only by staying within the club, and seeking allies not antagonists, can any sensible reform be achieved, and important aspects of our economy be protected.