You do not need to purchase anything. Just go to the station in Basel. Find a train to Luzern. Get on the train and find a free seat. Then when the conductor comes show your Swiss Travel Pass.
Make sure to sit in the correct class though. If you have a 2nd class STP you can sit in a 2nd class carriage.