As long as you have the right to live and work in the UK you should be able to work for any UK company. If you can manage to get the UK family visa, this will give you the right to work in the UK. However, you need to either be married, engaged or can prove you’ve been in a genuine relationship for more than 2 years with your girlfriend to get the family visa. If your girlfriend is to be the sponsor, then she will have to be in salaried employment for more than 6 months and earning more than £18,600/yr before you guys can apply for the visa.
If you are serious about this, I suggest you speak to a UK immigration specialist to find out your options.