Q: brake pedal and gear shift? on 2001 Volvo S40

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
What I thought was a problem with my gear shift button sticking actually seems to be tied to the brakes. The brake pads themselves look good. My gear shift won't unlock until I've pumped the brakes a few times, and my brake light itself comes on and off randomly. Any ideas?
(1) Answer
(2) Comments
There is a shift-lock feature on your vehicle that prevents you from putting the transmission into gear until you put your foot on the brake pedal. When you step on your brakes, the brake light switch sends a signal to the brake lights and to the shift lock system, this signal is used to "un-lock" the shift lock so you can take it out of gear. So, if the brake light switch is not working properly, your shift lock will not work as well as your brake lights.
Your going to have to pay a diagnostic fee, and that will run about an hour. This should be enough to diagnose and repair the problem if it is the brake light switch. The switch will run around $40.00 if it needs to be replaced.
So what kind of repair am I looking at? A sensor for the brake light? Any ideas what something like this will run? Most of the mechanics around here charge a diagnostic fee just to look at the vehicle, I just want to guage how much this is going to cost me before I take it in. Thanks!