Working remotely

Hi, there!
I am a student at the Humboldt University of Berlin. Currently, I am in London and want to begin working here. I wonder if I can begin working here and continue working for the same UK company when I will be back in Berlin? I am a citizen of a non-EU country, but I have a residence permit from Germany and health insurance.
Thanks in advance.

As long as you are abroad, whether you can work depends on the regulations there. You do not need a German visa or work permit for it.
Once you are in Germany on a student visa, you can work for a limited number of hours - I think it is 20 hours per week (check this!). However, you'd have to be paid by the German office of your employer - otherwise the formalities become very complicated (the employer must contribute to German social security, etc., when they employ you).