A foreigner setting up company while working the the U.S.
My question is am i allowed to start and work for the company as long as I'm technically volunteering i.e. i wouldn't draw a salary and any money I make would be through profits paid by the company?
The 2nd option i have considered is forming the company in the UK and working for it. However as i am resident in the U.S. would that cause issues when I try and sell to U.S. companies?
Since this is more of an immigration related question I would recommend you to consult an immigration attorney to see what restrictions you particular visa or immigration status have on running a business or being employed by one.
In general (with some exceptions) foreigners are not particularly restricted from being members of US LLCs, or shareholders of US corporations (restrictions do apply to S-Corporations though). However, owning a business is one thing and running a business is another. Being it a grey area I would, again, recommend you to consult an immigration attorney to see what restrictions apply to your case specifically.
As far as doing business in the US with a UK company, its possible, however could pose its own challenges, such as obtaining a US bank and merchant accounts for your company, etc. In the end you might have to foreign qualify your UK company in the US, in which case just forming a US entity would be a simpler solution, especially since you are already in the US.