You can dig a pit by pressingand then selecting the shovel.
However, you can make a wooden shovel which will work the same as the usual shovel, albeit using it will result in longer times.
URW Game Encyclopedia description
The official URW in-game encyclopedia (accessed by the key) describes the shovel thusly:
The shovel is used to dig trap-pits. (Used in passive hunting -- see TRAPS for more info.) It's also used to prepare the soil in order to plant/sow something with AGRICULTURE skill.
- Wooden shovel - The cheaper, craftable, but somewhat weaker counterpart.