What's the proof for living under the law of the country you live in as long as it does not contradict Shariah?

And which laws of the Mushrikeen-e-Mecca did our beloved Prophet Muhammad (Sallallahu Alayhi Wasallam) obey to?