When it appears in the wild, it copies everything about your buddy's appearance, including shininess. (Funny enough there were some videos of people using their masterballs on what appeared to be wild shiny legendaries, which then turned out to be Zoruas
A better way to weed out Zoruas is having a buddy Pokemon that can't appear in the wild (like most legendaries/baby Pokemon for example).
After the cutscene, it will show if its shiny or not... if you manage to catch it.