If I understand your explanation correctly, I think the code is a little muddled up.
It looks like what you want is for http://www.somewhere.com/something.php?p=home to go to pages/home.php is that right?
In that case, I would do your code like this.
<?php
if($_GET['p'] == 'page') {
include 'pages/page.php';
}
else{
include 'pages/home.php';
}
?>
I think what was causing the code to function improperly was the fact that $_GET['home'] == $p means:
http://www.somewhere.com/something.php?home=$p
whereas you had wanted this:
http://www.somewhere.com/something.php?$p=home
Just remember that the 'p' bit in $_GET['p'] refers to the name of the parameter p, what is returned is the value of this parameter.