Foreigners can't invest in China's stock market.
>Foreigner may refer to: Alien (law), a person in a country who is not a citizen or permanent resident of that country.[1]
If someone earns RMB and lives in China, then presumably they're either a citizen or a permanent resident.
I'm neither a citizen, nor a permanent resident. The Chinese don't hand out greencards easily (maybe a few hundred a year) and even then often only to people of Chinese descent.
Please elaborate in this.