When I saw Jessyratfink 'ible on how to shorten a zipper, I thought that was one of the 2 ways my mom used to do it. The other one is used when the zipper is "openable".
Step 1: Measure
Maesure the zipper and cut it. For this 'ible I do it for a cardigan.
To avoid the zipper to undo, use a lighter to melt a bit the ribbon. Pay attention, you can't use this method if the ribbon is in cotton, silk or other natural fibers.
With pliers, scissors, screwdriver or anything you think it's good, take away the little stoppers on the open side of the zipper. This little piece of metal has some teeth that keep the stopper in place. The trick is to use them to put the stopper back where you need it.
Put the stoppers back, using pliers. This is sometimes difficult. You can throw away the stoppers and sew a stopper yourself with thick thread.
This method is usefull because rarely I find a zipper of the right lenght for my sweater.