China and the islands of Japan were fabulous lands with virtually no European contacts through many hundreds of years of their early history. Their production of luxury products attracted European traders. By the early nineteenth century the East India Company and other British companies were China’s main customer for tea, fine china etc. China would officially only accept payment in silver. Being short of that commodity the East India Company, supported by the British government sold opium grown in India in return for payment in silver by Chinese internal dealers. Eventually, the Qing dynasty, being in terminal decline, was forced to allow British and other western powers to assume quasi-colonial status in parts of China.
Japan took a different route, maintaining isolation for many years, but quickly adapting, with British help, to western industrial and military methods at the end of the nineteenth century.