The purpose of the switch is to cut the fuel supply (which is at high pressure on fuel injected cars) in the event of a collision, thus hopefully preventing a fire under such circumstances. They can occasionally be activated by rough road. If it happens regularly then it is probably worth changing.
Shorting it out is NOT a good idea...
