High on ice, short on sleep and dressed only in his underwear, Albert Rapovski was snapping selfies with some friends and a sawn-off shotgun in a down-at-heel Melbourne motel room.

Not long after they posed for this picture, one of those friends, Mahamd Hassan, was dead, shot in the face by Rapovski, a victim of his "extremely stupid behaviour".

Albert Rapovski, left, holds the sawn-off shotgun as he poses on a motel bed with his friend Mahamd Hassan.

"Guns, drugs and stupidity do not mix, never have, never will," Supreme Court Justice Michael Croucher said on Thursday, before sentencing Rapovski to eight years' jail.

Rapovski, 20, was drug-affected when he and his friends posed with the gun as if they were "would-be gangsters" in photos at the Parkside Inn Motel in Kingsbury in Melbourne's north east on March 5, the judge said.