Of course it's legal. Even you admit that your actions appeared suspicious. The shopkeeper did not have to believe your story. More generally, people are not required to be certain a crime is being committed before they call the police. Such a requirement would result in a lot more crimes, and a lot fewer arrests.