I've recently started a remote job with a UK-registered company, and I am working from Italy. If the company does not have a local office in the country (which mine doesn't), the easiest way is just to become a contractor/freelance and send invoices for b2b services. I had to hire an accountant to manage taxes, but it's doable.