Hi Andrei,
No.2 has the correct word order but there is a mistake in the tense.
There are two actions in the past but at different times, so we need to say:
When the policemen came to the shop, the thieves had already disappeared.
We use the past simple for the more recent event (came) , and...