The sentence is possible but is not the greatest ever written, in my opinion. You may mean "It started raining when/while I was out shopping". "going to a shop" means visiting one shop.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
HotmaleIt started raining when I was going shopping.The grammar is OK, but it doesn't say what you mean really coherently and idiomatically. One of these may be what you want.