Shape key collection name
I figured it out. I also added the basis name, shape key name and shape key index:
import bpy
 
#Defines the selected shape key index.
selected_shape_key_index = bpy.context.object.active_shape_key_index
print(&quot;The selected shape key index is&quot;,selected_shape_key_index)
    
#Defines the selected shape key name.
selected_shape_key_name = bpy.context.object.active_shape_key.name
print(&quot;The selected shape key name is&quot;,selected_shape_key_name)
    
#Defines the selected shape key collection.
selected_shape_key_collection = bpy.context.object.active_shape_key.id_data.name
print(&quot;The selected shape key collection is called&quot;,selected_shape_key_collection)

#Defines the Basis name
basis_name = bpy.data.shape_keys[selected_shape_key_collection].key_blocks[0].name
print(&quot;The basis name is&quot;,basis_name)