First thing, in the property editor for the "Shape" Panel itself, the "popupOnRightClick" option should be disabled.
Next, on line 25, "shapeLabel" should be "ShapeLabel" capital S
There should be a period after ("popupMenuItems") and not a comma
Then adjust the substring amount accordingly (change 7 to 5)