A pig ark will be the best solution. These come in all sorts of shapes and sizes, you can buy new, and get occasionally secondhand.
Google "pig ark" and you'll see plenty.
Once you have decided on the shape you like, you will need to decide size, whether you want a base, and if you are far enough north to merit an insulated ark
On size, you'll need to balance the no. pigs you have initially, with any plans for expansion. If you think you might expand, you may do better to buy a larger one so you don't invest twice!
On bases - if the land is dry and free-draining, and you don't plan to keep over winter, then you may get away without one. Otherwise a base is probably better. You can get one with the ark, or use pallets to fill the inside. Any industrial estate will throw these at you, and you can use one to fill the gaps in the other creating a floor with no holes. Otherwise you can use 3 or 5 pieces of 4*2 to make some "rafters" and nail or screw 6*1 to it to create a base. All depends on how much you want to spend and how DIY you are!
Insulated - if you are in the north, consider an insulated ark if keeping pigs over winter
Electric will keep pigs in, but with two provisos. First you must train them to it first, otherwise the first time they touch it it is 50/50 whether they go backwards or forwards. Either direction takes the pig out of contact, so if the latter you have just taught you pig to escape! Create a small area enclosed area (say with stock wire) and put the electric just inside this - about 6 inches high. The pigs cannot then go forward so will learn to back off. You can then put them into a larger area just behind electric. Second proviso is that you need to consider if you pigs do escape from the electric, where will they go? If onto the main road, or into next door's prize vegetable patch, then you might want to use it in conjunction with some stockwire, just in case.
Finally we like using “horse tape” rather than wire for the electric. The pigs see this more clearly, and you can also easily see that it is all in tact, without having to walk the fence to check it.