Just place the script in the "Editor" folder in the Project pane. If there isn't an Editor folder, create it and place the script inside.
It will create a dropdown menu from which you can align and distribute your selected objects.
Alignment will snap the selected objects to the "active selected object".
Distribute will evenly distribute all selected objects between the "active selected object" and the object furthest away from the active selected object.
The "active selected object" is the object you'll see in the inspector when you have multiple objects selected. It will be the first selected object if you select the objects in the Hierarchy pane, and will be the last selected object if you make your selection in the 3d view.