Gun at store brings prison term