To do this, you need to use your custom property to drive a value node.
- Add a value node ( ShiftA --> Input --> Value ) to your material node tree.
- Right click on the number in the input box and add driver.
- Open the graph editor window, change the view mode from F-Curve to Drivers, then open the properties panel (N).
- Change the driver Type to Scripted Expression.
- In the variable's Path box type the name of your custom property delimited by square brackets and double quotes. Example: ["myProp"]
- In the Expr (expression) input box, make sure the name of the driver variable (default "var") is present.
That's it. You're value node is now connected to the value of your custom property, and any changes you make to the custom prop will be reflected there.