My grandfather has chf, adema in his legs and kidney failure how dangerous will shunt surgery be?

Failure is Dangerous. Heart failure & kidney failure is more dangerous than shunt surgery. The shunt is for dialysis which can improve both heart & kidney failure. When the heart completely fails one dies, but when the kidneys fail there is still di alysis, which could be good for your grandfather.
Risk. There aooears to be a significant risk but consult with his cardiologist since there are different degrees of what you are telling us.