China was a closed economy until the signing of the Treaty of Nanking that ended the First Opium War in 1842. The treaty paved the way for the opening up of the Chinese economy and even today it guides Chinese thinking in international relations.
Except for the city of Canton where limited foreign trade was allowed, the Chinese economy did not allow any mercenary ties with the West until 1840. Though the British East India Company was flourishing in India it faced a trade imbalance with China. So the British traders began selling opium to Chinese dealers who smuggled the dope into the country. Large quantities of opium from factories in Patna and Benares in India were sneaked into China, leading to an alarming increase in the number of addicts and filling the large gap in trade with China.
When the Chinese emperor tried to end the opium trade, the British sent troops from India to attack the Chinese coast in the First Opium war. China was forced to sign the Treaty of Nanking, the unfair terms of which were dictated by the British.
As per the treaty, China opened its ports and markets to western nations.
Tariffs and concessions were created and foreign trade surged ahead, stimulating the development of Chinese capitalism. However, the sudden inflow of cheap western products crippled native industries. Many businesses did not survive as they failed to adapt to the changes, resulting in unemployment and poverty. The economy collapsed in no time. The government could neither protect its people nor control the rising insurgency and chaos in the country.
Though it brought about the collapse of the economy and caused social chaos and political instability, and partially brought China under foreign rule, the treaty indeed awakened China from its slumber, forcing it to take notice of the progress of the rest of the world. It was on this day that the rise of China truly began.