Jamel Bonilla pleaded guilty to illegal possession of a firearm, a silver handgun that belonged to his father, and two counts armed robbery in Salem Superior Court yesterday.