Sorry, I stand corrected, you're quite right about the double taxation treaties. I had thought it was EU wide but only in that most countries in the EU have double taxation treaties.
As for setting up offshore companies, it's not what I do as I pay tax in the UK for my earnings but I know others that do, it's legal if you meet the criteria and I don't see why not.