This is a common problem on the VTX models and may be an issue on the Shadows as well although i have not seen nearly as many postings regarding it happening on the Shadows though. I think however that all the switches are built the same so it should work on all of the models.
Anyway, one minute the bike is working great, the next, you go to start it and everything works except the starter and the headlight. There are a couple of things that are common sense stuff that needs to be checked first...
1) Check your fuses
2) Make sure your battery cables are tight. (use a wrench or a socket/ratchet) using a screwdriver just does not get them tight enough and they vibrate loose and create an intermittent problem that is a bitch to diagnose. So tighten them with the right tools and you know its got a good connection.
3) Kickstand safety switch. This switch kills the bike when it's placed into gear with the stand down and will not allow the bike to crank in gear with the stand down. Make sure the bike is in Neutral when trying to start (sounds stupid, I know, but enough people, including me have at one time or the other thought there was a problem when it was that the stand was down and it would die every time it went into gear)
4) If you want more confirmation, you can jump the power leads for the starter at the 30amp fuse located behind the right side cover. Jumping these leads WILL BYPASS ALL SAFETY DEVICES AND CRANK THE BIKE, EVEN IF IT'S IN GEAR!!!! Make sure that the bike is in neutral if you do this....if the bike is in gear and your problem is the switch and not the starter itself, your bike will leave without you!!!!(this will also get you off the side of the road in the event your switch goes out while your out on a ride)
Now if you have completed all of the steps above and the bike still will not start, the problem is most commonly the starter switch being full of crud. They are cheap enough to just replace then but if you want to save a few bucks and get back on the road quick you can disassemble it and clean it yourself.
1) Put a tarp/towel or something light colored under the front of the bike, when the switch comes out there are small parts could drop to the floor and you do not want to lose any of them.
2) Remove the 2 screws (#2 phillips) holding the bottom of the switch housing in place. The bottom of the housing will hang from the wiring harness for the switch.
3) The switch wiring is held in place by a small metal retainer that has one small screw (#1 phillips). You have to remove this retainer and pull the wires away from the switch as the retainer and harness are covering the switch mounting screw.
4) The switch is held in with one small screw (#1 phillips). Remove this screw and carefully lift the back of the switch away from the housing, gently pulling up and back will remove the switch from the lower half of the housing and you set the housing to the side for now.
5) Now you will need to open the switch up, it's spring loaded so be careful from this point until you have it reassembled. The 4 wires are soldered to a plastic base with 4 tabs, 2 on each side. I used the point of a knife to spread it a little in order to pop the switch apart. Once it is apart, you will see 4 metal contacts (pads) on the base. The switch itself just lays in the bottom half of the plastic switch housing and you will see a brass strip with two tabs (looks like little brass bumps).
6) Carefully remove the switch from the plastic housing, there is a ball bearing on the bottom side so don't lose it. Clean both the switch and the pad with 4 contacts. I sprayed it down with wd40 washing the gunk off. You will also need to use a fine grit sandpaper to "shine" up the contacts and the tabs.
7) Now you will need to bend the two tabs upward just a little bit. I used the edge of a screwdriver, just enough pressure to see that it has moved. You will alos want to stretch the spring on the end of the switch a little bit.
8) Coat everything with a thin film of vaseline and reassemble taking care not to lose any pieces. Test the switch itself before installing in the handlebar control housing. Test again once it is installed in the housing. I had bent my tabs too much and the switch was not fully springing back to send power to the headlight so i had to redo mine.