For me the real problem isn't that some corporations don't pay taxes in some countries, its that some corporations hardly pay taxes anywhere. That is the real problem. I don't mind Starbucks not paying taxes in the UK, as long as they pay a fair share of taxes somewhere.
What I would do is this: I would demand from all corporations operating in the country an overview of the corporate income taxes they pay anywhere in the world. If this is the same or more than the national corporate income tax rate, I would not add any tax. If it is lower, I would take cut of the lower amount equal to the percentage of total business they do in the country.
Example: Apple makes 10 billion profit a year and pays 500 million in corporate income tax (anywhere in the world), while the corporate income tax is 25%. So they should have paid 2.5 billion in taxes, a shortfall of 2 billion. If they have 50% of their revenue in the US, the US should take 50% of the shortfall, i.e. 1 billion.
This way, you avoid double taxation and you still force corporations to pay a reasonable tax to some country at least.
In your example, theoretically Apple could have shifted all their profits to the UK and paid a regular 30% (or whatever the corporate tax rate is there) corporate income tax, and then also be forced to pay in the US over their revenue share (if the US implemented your system)