Take Shaggy out for a nice long walk first. This will tire him out and make the rest of the process much easier. Dogs with more energy can get anxious much more readily. Expending this energy before focusing on grooming will prevent anxiety from building up too much.
Brush his coat using a pin brush to remove all traces of tangles, mats, burrs, and anything else that might have made a home in Cody's fur since the last time you groomed him and trimmed his coat. Take your time to get rid of any lingering debris, as leaving it in may cause issues later on.
Turn the clippers on and work in the direction Cody's hair is growing. Run the clippers down his back. Keep an eye on the temperature of the blades and lubricate them thoroughly and frequently to keep them from overheating and burning his skin. If you're not an expert with clippers, you may want to practice on a piece of shaggy fabric or something similar to prevent nicking your dog with them.
Continue working the clippers over the rest of his body in the direction his hair is growing. Be sure you remove any tufts of hair from the clippers to keep them working efficiently. If you need to, take a few breaks in between clipping to give Shaggy some time to relax if his anxiety is making him fidgety or nervous.
The best way to trim his belly hair is to have him lay down. This gives you access to his belly, his legs, and his paws. You may need to use shears to trim his paws, especially the areas between his pads and toes. If he struggles with laying down, you can use treats to encourage him to do so. Provide some gentle belly rubs if necessary for encouragement.
Use shears to trim around his bum, his face, muzzle, ears, and eyes. Once that is complete, time for one last going over with a slicker brush or boar hair brush. Then, give him a nice treat and take him outside as a reward. Make sure the whole process is as easy and calm as possible to make it easier to groom Shaggy in the future.