One way it works is by contracting a company that employs your people outside.
In Mexico there are several companies that do that, beware that they usually charge a % of everything you do: Not only salaries, but refunds or any other money movement you want to make.