It's easy. You have to select from the users table and the shop table and then compare them, so it would be:
<?php
$username=$_SESSION['Username'];
$id=$_GET['id'];
include("database.php");
session_start();
$points=mysql_query("SELECT * FROM users WHERE username='$username'");
$user=mysql_fetch_array($user);
$shop=mysql_query("SELECT * FROM shop WHERE id='$id'");
$row=mysql_fetch_array($shop);
if($user['cash']<$row['cash'])
{
echo 'Not enough cash.';
}
if($user['cash']=$row['cash'])
{
echo 'Successful.';
}
?>