Hello there

welcome to the LFS Forum!
You can easily bind a button on the G27 to pit.
Try this: Go to LFS' Options > Controls > CTRL+
(we're going to bind the pitting function on CTRL + F12)
Type "/shift p" on the box next to CTRL + F12 (without the ", of course!)
Now simply click on the [none] next to the CTRL + F12 (under Wheel Buttons) and hit the button on the G27 that you want to use for pitting.
Easy peasy!
PS: Similarly you can use buttons on the G27 for other game functions (horn, indicators, wipers, headlamp washers, spectating, exiting etc.)
Okay, I was kidding about the wipers and headlamp washers!