This is where energy for the flash is stored. Even with batteries removed, if you touch these connections, you can be shocked, depending on if the flash capacitor has a stored charge. It may not have a stored charge, but work around this assuming it does.
Newer cameras of decent quality usually have a bleeder resistor to drain the flash capacitor. This may not work anymore and the flash capacitor may still have a charge.