Right now it seems that to enable shuffle and change the shuffle mode ("songs", "albums" or "groupings") you need to resort to Execute AppleScript action:
tell application "Music"
set shuffle enabled to true
set shuffle mode to songs
end tell
I would love to see actions for
"Shuffle songs" action: with dropdown for "enable", "disable", "toggle"
"Set Shuffle Mode" action: with a dropdown menu to select "songs", "albums" or "groupings"
I'm not skilled enough to write custom actions yet, however.
A KM programmer could place the AppleScript inside a Macro, so that the programmer could simply call the macro, rather than resorting to AppleScript.
MacOS has a feature called "Type to Siri". If Siri has the ability to shuffle songs, then it would be very easy to write a KM macro that sends a text string to Siri. I'm not actually sure if Siri understands words like "shuffle music" but if it does, this idea will work. I know it responds to commands like, "Turn off all lights." I've done this as a way to get KM to manipulate my Apple HomeKit devices.
if you know that AppleScript exists and it occurs to you that you can use. I think the natural thing for a user is to search for actions the "Music" group inside Keyboard Maestro
if you already know AppleScript, and know that you can use Script Editor to try it, etc, Or if you are willing to learn it.
Just finding that the values for set shuffle mode are songs, albums and grouping requires some familiarity with Script Editor > Window > Library > Music.
I guess, if the user is motivated enough he will google and will find in posts like this and get the idea of using "Execute AppleScript" action and the
tell application "Music"
set shuffle enabled to true
set shuffle mode to songs
end tell