He is available to spar with the Hero at any time in the training room in the Castle basement. This can be activated by simply talking to him and selecting he "spar with me" topic, at which point he will ask the Hero what size of weapon they want him to use: a two-handed weapon, one-handed weapon, or a dagger. None of the sparring weapons will cause damage to him, however.
The sparring lasts until he is knocked out. Then, after a few seconds, he will get back up and the Hero may spar with him again. A good way to keep sparring without hurting Shagrol is to pickpocket one or all of his sparring weapons and start sparring with him, using any of the stolen weapons.