While this might work in some situations unless you keep the shingle flat against the roof and ensure the nails are at the correct depth there may not be enough support to hold the weight of your item.
How to attach something to a roof.
If you have side rails and crossbars the straps can be looped around those.
On each side of the roof you ll see a rack that runs the length of the roof of the vehicle.
In the case of a naked roof you should be looping the rope through the car through the doors not the windows and around the object on the roof and a towel or blanket should be used to protect the roof of your car from the object.
Use a tie down that wraps around the item and the rails.
With the third option crossbars with side rails you can secure an item to the side rails and run tie downs from front to back securing them to the crossbars.
It s a much better idea to attach a shade sail to your other backyard structures such as your gazebo or trellis.
If you plan to install a camera on your roof or install a dish on a shingled roof surface you may need to use nails which create holes in an otherwise waterproof surface exposing the entire structure to moisture problems.
What types of tie downs work best.
This video is about all surface roofing construction.