The simple solution is to use the shovel: the dirt, rocks, etc. will remove most of the rust while you work. If that’s not enough or you want to get the shovel as clean as possible, there are more elaborate ways to go about the task.
One way is to use wet sand. Place the sand in a bucket and soak it with used motor oil. Then plunge the shovel in and out of the bucket. After the shovel has been through the process wipe it with a bit of oil on a rag. Later, you can store the shovel in the sand/motor oil mixture. In fact, you can store all of your shovels, rakes, and hoes in buckets full of sand/motor oil, thus keeping them clean and all standing in one place.
If you want to take the rust removal to an extreme level, you can use Naval Jelly which is basically phosphoric acid. If you want to use it to remove rust, wire brush the shovel first to get most of the rust off, then “paint” on the Navel Jelly and let it sit for approximately 10 minutes (but not longer than 15 minutes). Wash off the Navel Jelly with water.