> If we equalize global economy by trading with or including a country that does not treat workers humanely, how do we resolve that?
I agree that's a very important question.
First I think we need to stop talking in absolutes. I'm not saying globalization is "universally" good; I'm saying there are great benefits; there are also real problems, including the one you point out. Nothing in the world is perfect; if we only move forward on things when they are perfect, we live in caves - which are pretty imperfect themselves. The question is not perfection but how can we do better?
Post-WWII globalization has created the greatest benefit to common people in the history of humanity. After thousands of years, hundreds of millions of people in China have been lifted from desperate poverty to 'middle-class'[0] prosperity. The same has been repeated in India, Brazil, South Korea, and many other places in the world. People in the West also are immensely wealthier, live longer (and have more freedom). Also, specific to the question you raised, human rights have spread at a rate also unprecedented in the history of humanity; look at the explosion of democracies and of liberty. While there are problems, the benefits are overwhelming IMHO.
There also is a moral component: People generally believe in freedom, and economic freedom, to trade with whom you like without government stopping you, is an important one.
But I do take the problems seriously:
* Impact on individuals: This is the fundamental problem, IMHO: Capital can move much faster than individuals; a factory can move to another country much faster than the workers can find new, equivalent jobs - for most, moving to another country is practically impossible - especially if half the town is now unemployed. Therefore, trade provides a net benefit, but the impact on individuals is disparate to a great degree. We need to protect those individuals, by giving them time to adjust (require a warning or continuing salary for X time, perhaps based on the impact on the local job market), by compensating them for the change (taxing the benefits of moving capital and giving some back to the people making the biggest sacrifice), and by means of the latter taxes, also raise the cost of such changes to the point where it's economically viable not just for the company and future employees, but for those left behind.
* Human rights: To not trade - to lock billions into extreme poverty (often defined as less than $1/day), starving, with no education, medical care, etc. - seems the opposite of concern for human rights. Money is essential to "life ... and the pursuit of happiness". As for liberty, there's long been the theory, often born out, that when a middle class grows in a country, they demand political rights. That's been true in many countries, including parts of China (Taiwan and Hong Kong), S. Korea, Brazil, Chile, etc. But to rely on it just happening is insufficient; we need to do more, including writing human rights into our agreements, leading on the issue (which the current US administration has abandoned), and pressuring others into expanding them.
* Labor practices: I think these need to be written into trade agreements, though I don't know what's already been done - I think it's widely assumed to be nothing, but I've never read anything by someone who actually knows what's in the agreements. However, it's a false assumption that labor costs are the prime cause of manufacturing moving, based on at least some economists I've read. Manufacturing was big in mid-20th century West and has been declining since; Americans now have much better paying, safer, more comfortable jobs than working in factories. That's a good thing; we need to do much better, but not by going backwards. Manufacturing is often done in China because that's where the expertise and other resources are concentrated (from infrastructure to bankers to talent to suppliers etc.), the same reason SV is home to the IT industry.
[0] I won't bother to define it here; I hope you get my point.