An easy way to make a rectangular prism would be to sort them 8 x 2
That means that you would create 2 rectangles with 8 cubes, and then put them together. To make an 8 cube rectangle, you should place 4 of them for a width, and 2 of them for height.