The boyfriend of a woman who was killed in a shooting has been jailed for five years for conspiracy to supply class A drugs.