Mack,
the problem that you have is not uncommon and can usually be fixed by the installation of a water hammer arrestor. The sudden shut off of the water
supply to the dish washer causes the pipes to hammer or shuder as you have described.
There are a number of model and types available and
they should be fitted by a licenced plumber.
I do not know where you live but if it is in Australia then use the
good quality plumbers that are availble with the system.
colin Dunn