An encounter broke out on Wednesday between militants and security forces in Shopian district of Jammu and Kashmir, officials said.