If you're doing work for a foreign company it's best to pay an accountant to sort out the tax for you. I know people who work in UK for foreign companies usually set up and LTD company and then pay themselves through that, through dividends etc, effectively only paying about 20% tax on everything.