It isn't as easy as shoot first, ask later! Because as the incident with the Indian Navy vessel which attacked a Thai fishing vessel showed, mistakes are made!
I'd like to see all these pirates burn in hell as much as the next guy, but we can't just start shooting at everything that looks slightly suspicious! That would be a bit like the police fining everyone they think have an intention of speeding.
If there have been a confirmation of the ship having weapons onboard or they have directly attacked another ship, by all means: SHOOT! But we have to make certain.
I think the best solution would be to deploy two carriers, one in the gulf of Aden and one east of Mogadishu. That would allow them to scramble jetfighters which can be just about anywhere along the pirate infested areas within an hour! And one short burst from a Vulcan 20 mm cannon would pretty much foil any attack. And I think most ships should be able to keep the pirates off for an hour from spotting them if they keep a proper look out!
Hopefully, with the latest developments and the US' renewed interest in the pirate attacks, that thought isn't that farfetched!