Noun. From Cantonese.
“Products that are inspired by famous counterparts”
This is, apparently, a commonly used word over in China. It must be stressed that the implicit meaning is not the English equivalent of ‘knockoff,’ but a greater effort at mimicry.
The characters apart from one another mean mountain stronghold/village, and refer to the stocks of materials that, historically, bandits would hide away from official control. It was also a slang word used for the bandits who wanted to evade official control; a bit like ‘rebels.’
In modern Cantonese it is used a slang word, and a shanzhai factory can refer to a low-end, family-run company. This isn’t necessarily a result of wanting to cause confusion or deliberate copyright-infringing imitation; it is extremely hard to become an official electronics company in the East, so in order to avoid these stringent regulations, taxes and other government barricades, they go to lengths to remain shanzhai.
There’s a great channel on YouTube from a wonderful guy known as Ashens who performs candid reviews of products that could certainly be classed under this term… if not other colourful phrases! Go and take a look at his videos (but remember, it’s NSFW; expect hilarity and profanity).