Check what order the partitions are in, if there's a partition
between home and var this won't work (not without some other disk
to temporarily store data).
/dev/shm is NOT a partition, leave it alone
As for the other(s): it's possible; but you'll have to back-up
the content of /home and /var to / (somewhere), unmount /home and
/var (ideally you do this all from a live or rescue CD),
Delete the partitions; recreate one big partition; give it a file-
system; adjust fstab in your /etc (change /home partition, remove
/var line). Mount home. Restore /var from backup, restore /home.