don’t know why your getting a white screen, try turning on debugging and debug display https://codex.wordpress.org/WP_DEBUG
but I did see a logic error error in my code
if (!isset($_GET['product'])) {
// show content of all products here
} else {
// normal page display here
// show content of all products
}