It's not only China.
North Korea and Pakistan have been engaged in conventional arms trade for over thirty years. In the 1980s, as North Korea began successfully exporting ballistic missiles and technology to Pakistan.
Bhutto’s 1993 visit to Pyongyang seems to have kicked off serious missile cooperation. By the time Pakistan probably needed to pay North Korea for its purchases of
medium-range No Dong missiles in the mid-1990s (
upon which its Ghauri missiles are based), Pakistan’s cash reserves were low. Pakistan could offer North Korea a route to nuclear weapons using HEU that could circumvent the plutonium-focused 1994 Agreed Framework and be difficult to detect.
Despite claims of indigenous development, there are many indications that the Hatf 1, 2, and 3 benefitted from Chinese assistance. Pakistan renamed some imported Chinese M-11 missiles as Hatf 2a missiles in the early 1990s. The Hatf 3 are variants of Chinese M-9 missiles, and the Hatf 4 (Shaheen 1) are based on Chinese M-11s.
It is clear that KRL cooperated with North Korea in developing the
Ghauri (Hatf 5). In 1992, Pakistani officials visited North Korea
to view a No Dong prototype, and again in 1993 for a No Dong flight test. There are reports that then-Prime Minister Benazir Bhutto visited Pyongyang for one day in December 1993 and many analysts believe
missile sales were on the agenda of her visit, despite her public denial. According to one report, North Korea sent 5 to 12 No Dong missile assembly sets to Pakistan between 1994 and 1997.
All this talk of an 'indigenous' missile development program is humbug!
More here...CRS Report for Congress