We now come to a series of events that poisoned the relationship of China with the rest of the world.
The first are the two so-called “Opium Wars“ in the mid 1800’s. There was an active trade between the West and China -- China had many products desired by the West (silk, porcelain, and even technology) while the West had little to offer in return. China demanded and received payment in silver with the result that the preponderance of silver in the world gravitated to China. There was, however, a vast illicit trade of opium (illegal in China but amounting to 18,000 “casks” in 1826 alone). A new Chinese governor decided to enforce Chinese law while his government in Peking reacted with “Confucian contempt” on such matters as trade.
The West, specifically England, did have one advantage, superior military capability. Under the banner of “free trade” China’s inadequate navy was defeated in two wars, 1839-1842 and 1859-1860.