A shock cannon was a cannon that fired a beam similar to that of a beam cannon, although the beams of shock cannons lasted a much shorter period of time and fired at a faster rate. They did very little damage against a capital ship, although they were capable of damaging starfighters to a degree. The amount of damage dealt out to a ship was determined by how close the ship was to the cannons, and what type of ship it was. Only a direct hit at close ranges would take a ship out with one hit, and at medium to long ranges, it would take multiple hits, making shock cannons a bit less effective out to longer ranges than their beam cannon counter parts.
Behind the scenes
Shock cannons replaced the laser cannons of Alpha-3 Nimbus-class V-wing starfighter in Star Wars: Battlefront II.