A database is usually the best way to go if you have more than a handful of products.
www.oscommerce.com is an open source solution that is also a good one to study if you are creating your own. Although it is slightly over complicated by certain features which may not be relvant to you.
If you already have a datasource for your products it's usually best to work from this.