If they believe that Allah authorized him to do that, and that he is created by Allah, and that he is a slave of Allah, and all the powers he has are from Allah, then this is not shirk. But if they believe that he has these powers independently of Allah then that’s shirk. If one commits shirk unknowingly, and one really tried to know the truth, and one is not stubborn, then Allah may retest this person after he dies