You can't. Unless those countries implement living wages and worker protections. The problem with a global economic system is that we don't have a global legal system.
This is why trade deals are so important, because they are internationally enforceable contracts which can stipulate working conditions and various human rights. But conservatives want unfettered global trade without legal or sovereign concerns. That has made the UN and most trade organizations ineffective or outright puppets of hyper-capitalist countries.
Thus the question for the unskilled worker shouldn't be "how do I compete with foreign labor?" but rather "Why are elites in our country dumpster diving abroad for cheap, inhumane labor, and going out of their way to *protect* that labor so they can keep their profits?"