That may or may not fix it. You have to check which direction the hinge-side jamb is out of plumb. You might need to shift the hinge a little or, if it's really bad, you may have to remove the casing to re-plumb the jamb.
If shmming one of the hinges is the right way to go, I find pieces of non-corrugated cardbord (like cerial boxes are made of) works really well. If you have to shift one of the hinges you need to fill the existing screw holes for that hinge and drill new ones. Be sure to use a self centering drill bit or a punch (nail set works) lest the drill bit will wander from the center of the screw hole.