What effect did western imperialism have on China?
The impact of Western imperialism on China was almost completely negative. In contrast to Japan, China did not use the Western imperialism as an impetus for modernization. Instead, China was much more directly dominated than Japan was. Western imperialism helped to keep China weak. China would not recover from that weakness until the later parts of the 20th century.
To be fair, China was already pretty weak by the time Western imperialism started. China's weakness could be seen, for example, in its inability to respond effectively to the Opium Wars. Instead of modernizing like Japan did, the Chinese government essentially gave in to the Westerners, granting them all sorts of concessions in various port cities.
Because the Chinese government could not effectively resist the Westerners, it lost the faith of the people and eventually disintegrated completely in the early 20th century. Thus, Western imperialism weakened China and the Chinese government to the extent that it fell apart and plunged China into an era of competing warlords and factions that did not end until the Communist victory in 1949.