Gerard Flannigan, from Colin View Street, pleaded guilty to three offences.
Belfast Crown Court heard that there was no evidence to link Mr Flannigan to the gun attack on a house at Velsheda Court in September 2014.
However he took delivery of the semi-automatic pistol after the shooting.
The judge told Flannigan that he will serve half his sentence in prison with the remainder spent on licence after his release.
The court heard that three children were at home when shots were fired at the male occupant of the property in an attack branded as "cold-planned" and "potentially murderous" by the judge.
The prosecution said Flannigan was arrested after the gun used in the attack was found wrapped in two plastic bags underneath his partner's parked car the following day.
The weapon was discovered in the car park of a housing complex in west Belfast by a cleaner on the morning of 4 September 2014.
A 35-year old man has been given a five-year sentence after he admitted possessing a gun used in an attack on a family home.