Hong Kong operated as a highly independent special economic zone for doing business in China (at it was very close to the Shenzhen SEZ). Its success was due to the way China partially opened up, and the role it played as a crossroads into China.
In 1980 when the Shenzhen Special Economic Zone was founded Hong Kong had a GDP per capita of $5,700 as compared to $8,400 for the UK. Hong Kong was a first world country before China opened up for trade. Shenzhen was a fishing village of approximately 30,000 people. Hong Kong was a city state of 5 million. China didn’t become Hong Kong’s main source of imports until 1982.