A man has been jailed for firearms offences after shots were fired during an armed break-in last year.