David Cameron has warned businesses not paying their fair share of tax in the UK to "wake up and smell the coffee".

His comments were widely interpreted as a deliberate nod to Starbucks' recent announcement it will pay the Treasury £20 million in corporation tax.

The Prime Minister also appeared to float the possibility of a boycott against offending companies, warning that the public "have had enough". Coffee giant Starbucks and other multinationals, including the shopping website Amazon, have come under fire from MPs and campaign groups amid concern about the amount of tax they pay in the UK.

In a speech to the annual meeting of the World Economic Forum at the Swiss ski resort of Davos, Mr Cameron said: "Any businesses who think they can carry on dodging that fair share or they can keep on selling to the UK and setting up ever-more complex tax arrangements abroad to squeeze their tax bill right down, well, they need to wake up and smell the coffee because the public who buy from them have had enough."

Mr Cameron also used his speech to emphasise he was not anti-business and called for international co-operation to tackle tax dodging.

Business leaders said they welcomed his focus on trade, tax and transparency.

John Cridland, the director-general of the CBI, said: "The majority of businesses pay the right amount of tax, and for the small minority which do not, times are getting tougher, and rightly so. The CBI does not condone highly abusive avoidance schemes which serve no commercial purpose other than the minimisation of tax, even if they are legal.

"In some cases the tax system is lagging behind commercial reality, particularly around the taxation of the digital economy and transfer pricing. As the Prime Minister highlights, the UK needs to work together with other countries, including the G8, to change the rules where appropriate, so that they are fit for the global business age."

Tax lawyer Miles Dean, founder of Milestone International Tax Partners, said Mr Cameron had "missed a great opportunity to spell out to the international community what his G8 presidency considers abusive or unacceptable tax avoidance".

He added: "A multinational can and will locate risks, functions, people and costs in accordance with its geographic footprint.

"The UK has no control as to where a foreign-headquartered multinational corporation chooses to establish its finance company or regional headquarters, or its treasury/purchasing functions. Unless there is a uniform tax regime with a uniform tax rate and uniform accounting policy globally, David Cameron is banging his head against a brick wall."