Countries are broke. We live in a time of fiscal cliffs, austerity packages, and aging infrastructure. On the other hand, corporations are flush with cash as profits hit all-time highs, but they can't find any projects to invest in other than special dividends. Despite these somber facts, both government and corporations can take this opportunity to set the world up for a prosperous future that tackles issues like energy, food scarcity, and climate change.

It begins with Starbucks (SBUX 0.89%) and Her Majesty's Government.

Steeped in hot water
Starbucks, along with Amazon.com (AMZN -4.42%) and Google (GOOGL -4.72%), was called before the Public Accounts Committee in the U.K. to answer questions on the multinationals' taxes. Starbucks paid no income tax on its sales of $1.9 billion over the past three years, while Starbucks executives repeatedly called the U.K. business both profitable and a model to follow, according to Reuters. In 2011, Google paid $5.5 million on $636 million in U.K. revenue, and Amazon.co.uk paid $3 million on $334 million in revenue. With rather British word choice, the chair of the committee told Amazon: "You pay no tax here, and that really riles us. It riles us."

How do they do it? With what must be astute legal and accounting teams. Starbucks, like McDonald's (MCD 0.18%), charges its U.K. business a royalty for intellectual property. For Starbucks, this is 6%, and it ends up in the Netherlands. McDonald's charges a similar rate between 4% and 5%, but McDonald's also paid nearly $130 million in U.K. taxes over the past three years, compared to Starbucks' nil. Starbucks might also have optimally set transfer prices between a Switzerland coffee purchaser, a Dutch roaster, and the final U.K. business in order to reduce its tax bill. And Starbucks charges its U.K. segment relatively high interest rates on loans within the company, allowing the high interest payments to offset taxable revenue.

For Google, 92% of all sales outside of the U.S. are billed in Ireland. Google Ireland used to pay a fee to Google Netherlands to save even more on the comparably small Irish taxes, but it now administers Google Ireland from Bermuda.

Amazon operates its European business from Luxembourg, while it considers its U.K. business a fulfillment service for that Luxembourg-based company.

All the tax required
These companies are not doing anything illegal. In fact, not minimizing taxes might earn them lawsuits from investors who believe they aren't maximizing shareholder value. But countries are broke. The new e-commerce and Internet world, which allows seamless business across state lines, hurts government budgets, making it more difficult to invest in public goods and projects.

As the chair of the committee also said, "We are not accusing you of being illegal; we are accusing you of being immoral." But until such practices are illegal, or there are such policies in place that cannot be circumvented, companies will not pay higher taxes out of any moral obligation.

Now is the time, with governments reforming budgets, to reform the corporate tax code on a global level. This will not only free up the overseas cash piles that companies fear to bring back to the U.S., but also allow companies to focus on productive business instead of tying themselves up in red tape and shell corporations. U.S. corporate taxes as a percentage of GDP are at 1.5%, compared with a high of 6% of GDP in 1952. U.S. corporate taxes historically average 17% of total tax revenue, and in 2011 they contributed 8%. While corporate taxes are a small contribution to total tax receipts, they are still sizable. Even 10% of tax revenue amounted to $230 billion last year.

Corporate social investments
And as governments pare down investments that might be more controversial, companies can use their cash to take on such projects. Exemplifying this is NASA's contract with SpaceX, the first private company to carry cargo to the International Space Station.

The world now faces challenges with food scarcity, as we'll need to produce an estimated 70% more food to feed more than 9 billion people in the year 2050. But we must first overcome falling grain productivity, water scarcity, diminishing returns from fertilizer, rising fuel costs, and increasing weather instability.

And rather than follow the lead of Starbucks -- which, when faced with higher U.K. taxes, reportedly cut paid lunches and paid sick days, froze pay increases, and took away staff birthday cards -- companies can profitably contribute to society in other ways than through taxes. Exemplifying this in the energy sector is General Electric (GE -1.09%), which, though it made news for planning to pay no taxes on $5 billion in profit in 2010 (it ended up paying a small amount), is building the equipment to provide liquified natural gas to filling stations at truck stops across the country.

New business, new government, new growth
Companies have never been more efficient at evading taxes, and some governments have never been more in need of tax revenue. Governments must adapt their tax policy for the new business reality of multinational firms. Meanwhile, companies can use their latent cash to invest in infrastructure and projects that cash-strapped governments can't support -- and reap the profits and goodwill.