The Treaty of Ganghwa became the first unequal treaty signed between Korea and a foreign country ; it gave extraterritorial rights to Japanese citizens in Korea and forced the Korean government to open three ports , Busan , Incheon , and Wonsan , to Japanese and foreign trade .