If you want to get a legendary Shiny it will take a while.
First you save in front of the Legend just in case it doesn't come out shiny.
Battle the legend may times and eventually it will become Shiny.
Take it from me i got a shiny Rayquaza which is Black and looks preety cool