Pol. Col. Wanlop Jamnong-arsa said a half dozen gunmen in a pickup truck opened fire at the shop, a popular place for residents to congregate, and then fled. Three men and two women were killed and a man and a boy were injured, he said.
All were identified as Buddhists and the gunmen were believed to be Muslim insurgents, he said.
Thailand's three southernmost provinces are the only areas with a Muslim majority. The insurgents have not issued specific demands but are generally believed to seeking an independent Islamic state.
The attack in Pattani province followed the explosion of a roadside bomb last week in nearby Yala province which killed nine people.
The recent violence occurred after the government claimed to have made progress against the insurgents, whose attacks have generally become smaller in scale.
More than 4,300 people have been killed in the insurgency since January 2004.