Yes you cook the lobster in the shell.
When cooking a lobster you get water boiling hot and then place the still alive lobster directly into the boiling water and you cook the whole lobster alive.
The boiling water then kills the lobster and when it's cooked the lobster will be dead as a result of the boiling water and then you can remove the shell and anything else from the lobster.
For every lb of lobster you boil the lobster for 7 minutes per lb of lobster.
Add some salt to the water as well.
You can also bake the lobster alive as well by placing the lobster in a baking dish alive and then cooking it in the oven for 15 to 20 minutes.