you need to finish the dex to get the shiny charm. if someone traded it to you, it wont work because you need to get it from the professor.