According to China’s Labour Law, a foreign company without legal representation in mainland China cannot conclude labour contracts with Chinese citizens if the place of work performance is in China. To be able to do so, a legal entity must be established in the country, but even in this case the procedure to hire local citizens may differ: representative offices can do so only through ad hoc agencies (such as FESCO or CIIC); joint ventures or wholly foreign-owned enterprises may employ local individuals directly (or still choose intermediaries).
For foreign companies which do not wish to have any permanent establishment in China, but still need someone on the ground, the only possible solution is to establish a commercial relationship / service agreement with a self-employed professional, who will be responsible for paying independently income taxes and social security contributions.