Take the potatoes and rinse them until water the is clear. Then you want to drain them and squeeze dry them. Place the shreds in a bowl, and mix in the flour, onion, and egg until it is all evenly distributed.
Heat up about ¼ inch of oil in a large skillet, over a medium-high heat. Once the oil is sizzling hot, take the potatoes and place them into the pan in ⅓ an inch thick layer. Be sure to cover the whole bottom of the pan, or make separate piles like they are pancakes. Cook this until they are nicely browned on the bottom, then you can flip them over and brown them on the other side. It should probably take about 5 minutes to brown per side. If you are cooking them in one big piece, then it can be cut into quarters if that makes flipping easier.
Remove this from the pan, and drain them onto some paper towels. Season it with salt and pepper, and serve immediately.