Hi Lawrence, I liked Phil's succinct answer, so I'll add my comment here:
As an idiom, "riding shotgun" simply means "sitting in the front passenger seat." The reference to guarding or protecting the driver (ie. by having a shotgun in your hands) is historical, and does not have that meaning in modern English.