Practice using dog + leash + trekking poles while exercise walking around town with rubber tips on your trekking poles, to avoid possibly stabbing the dog. This also preserves your pole points from being dulled and the neighborhood sidewalk from being gouged (to which your neighbors may object). Using trekking poles for exercise walking turns walking into a whole-body exercise, which is a good thing.
Your dog will quickly learn to "heel" a little farther away from you than the normal position to avoid the poles. Hopefully you are not showing your dog in obedience competitions in which this would be considered a fault.
Teach your dog to walk ahead of you without pulling on the leash, except when the leash is fastened to his pack harness and you command him to pull. Even more important, teach him to walk directly behind you. I've found that this last position works best on the trail so I don't fall over the dog when he suddenly stops dead right in front of me to check out an entrancing smell. It's also a safer method to use when the dog is off-leash--you can grab him easily when other hikers, horses, bears or whatever appear on the trail in front of you. I make my dog walk "behind" whenever we come to a fence or a hedge right next to the sidewalk. I walk right next to the fence so he can't pass me. Hysson got the idea very quickly. I used the verbal command "behind," but any unique command will do as long as it doesn't sound like another obedience command. I didn't even have to use treats; a lavish "good dog" was enough.
I hold the leash in my left hand, between my palm and the pole grip. The leash is usually wadded up a bit so the dog won't put a foot over it. It took a bit of practice to get the hang of this--again, best learned close to home rather than on the trail with packs.
Another good command to teach the dog is the "flip finish" in which the dog starts sitting facing you, then makes a loop to your left and ends up sitting beside you in the "heel" position.
Here's how to teach it. However, you certainly don't need an electric collar and I definitely don't recommend it for 90% of dogs. The type of finish usually taught first in obedience classes has the dog make a circle going to your right side, circling all the way around you and ending up sitting at your left in the "heel" position. This method is fine in obedience classes (unless the dog gets distracted when behind your back!), but when hiking with trekking poles (where you can't change the leash from one hand to another) ends up with you having to turn around with the dog to avoid being wound up in the leash! I haven't used this method since I started using trekking poles 5 years ago. The "flip finish" is usually taught in advanced obedience classes. It's best to use a different command for the "flip" finish if your dog has already been taught the circling type finish. I was taught to use "around" for the circling finish and "finish" for the flip finish. Some trainers just use "heel" and teach only one type finish, or use "finish" for the circling type. If your dog associates "heel" or "finish" with the circling type finish, find another command for the flip finish that doesn't sound like one already used. ("Flip" is not a good command because it sounds too much like "sit.")
EDIT: After all the above verbosity, I finally found a decent video on UTube about teaching the flip finish. The sound is disabled but the video is just fine.
Teaching the flip finish These maneuvers are best practiced around home before going out on the trail. To get a good tight "finish," I found treats a big help. I practice this one with Hysson when practicing the "come" command which ends with him sitting in front of me facing me. Be sure to reward him for the "come" before ordering him to "finish" (or whatever you use), since you don't want him to confuse the two commands.