A GUNMAN has opened fire in a Spanish supermarket while shouting "Allahu Akbar", police have said.